Sam Stephenson
34b65bb904
Safeguard test teardown ( #45 )
2014-06-01 20:21:14 -05:00
Sam Stephenson
c7b0e6eba8
Style
2014-06-01 18:04:29 -05:00
Sam Stephenson
6b4802cf54
Merge pull request #56 from ahippo/load-abs
...
Make `load` handle absolute paths too
2014-06-01 17:58:42 -05:00
Sam Stephenson
219fca763f
Merge pull request #54 from ahippo/typo-fix
...
Fix typo in docs
2014-06-01 17:57:52 -05:00
Andrey Mazo
35f963010d
Make load
handle absolute paths too
...
Add 2 simple tests on this.
2014-05-21 18:30:51 -04:00
Andrey Mazo
37735a7065
Fix typo in docs
2014-05-21 00:01:13 -04:00
Sam Stephenson
2476770c84
Merge pull request #34 from j1wilmot/patch-1
...
Update TAP format link in README.md
2013-11-21 15:18:34 -08:00
Jeremy Wilmot
0f9dc5d3d9
Update TAP format link in README.md
...
The previous link to the TAP format wiki doesn't appear to be valid any longer. http://testanything.org/ redirects to a wiki page that explains the format, so this seems like the best place to link to.
2013-11-21 17:40:51 -05:00
Sam Stephenson
1041e46f39
Support single-line test definitions
2013-11-17 13:04:57 -06:00
Sam Stephenson
08374f7269
Avoid expr
for faster preprocessing
2013-11-17 12:34:13 -06:00
Sam Stephenson
80815f7ebd
Ensure $PREFIX/share/man/man{1,7} directories exist
...
Fixes #33
2013-11-10 22:56:29 -06:00
Sam Stephenson
26a89da1b5
Add makefile for man pages
2013-11-10 16:04:07 -06:00
Sam Stephenson
225440bb65
Update the man pages
2013-11-10 16:03:38 -06:00
Jakukyo Friel
b1eee9f455
add Manpages
...
- add bats.1
- add bats.7
- tweak install.sh to install manpages
2013-11-09 16:09:26 +08:00
Sam Stephenson
ddd03ab852
Remove unused variable
2013-11-04 14:00:58 -06:00
Sam Stephenson
4a187385d2
Simplify test names
2013-11-04 13:34:37 -06:00
Sam Stephenson
c8d63dd7e0
Correctly log errors in setup
and teardown
functions
...
Fixes #30
2013-11-04 12:20:55 -06:00
Sam Stephenson
bfa4ebcd0f
Prefer let x+=1
for incrementing counters
...
The `((x++))` syntax is shorthand for `let x++`. According to `help let`:
If the last ARG evaluates to 0, let returns 1; 0 is returned
otherwise.
Thus the exit status of the expression `x=0; let x++` is 1, since the post-increment `++` operator evaluates to the value of the variable before incrementing.
In Bash 4, this non-zero exit status properly triggers `set -e`'s error trap, but in Bash 3 it does not. That's why the tests were passing on OS X (Bash 3) but not Linux (Bash 4).
We can work around the problem by choosing an incrementation expression that never evaluates to 0, such as `+=` or the pre-increment `++` operator. For consistency and clarity, I've changed to `x+=1` everywhere.
Ref. #25 , #27
2013-10-28 21:01:51 -05:00
Sam Stephenson
417acfff66
Revert "Revert "Merge pull request #25 from sstephenson/stack-trace""
...
This reverts commit cb658ba91f
.
2013-10-28 20:13:45 -05:00
Sam Stephenson
cb658ba91f
Revert "Merge pull request #25 from sstephenson/stack-trace"
...
This reverts commit 07bdee33a1
, reversing
changes made to c36ad10d8c
.
2013-10-28 20:10:42 -05:00
Sam Stephenson
07bdee33a1
Merge pull request #25 from sstephenson/stack-trace
...
Log the full stack trace when a test fails
2013-10-28 13:13:32 -07:00
Sam Stephenson
de1970fb8f
Log the full stack trace when a test fails
2013-10-28 15:10:48 -05:00
Sam Stephenson
c36ad10d8c
Hook up Travis CI
2013-10-28 15:04:21 -05:00
Sam Stephenson
2e2477881b
Bats 0.3.1
2013-10-28 14:58:32 -05:00
Sam Stephenson
25505bd143
Skip pretty formatting if the first line isn't a TAP plan
...
Closes #21
2013-10-28 14:47:52 -05:00
Sam Stephenson
d2c5b9ef71
Remove defunct comment-pad trimming
2013-10-28 14:47:52 -05:00
Sam Stephenson
4b3670d4cb
Merge pull request #26 from sstephenson/ansi
...
Emit ANSI escape sequences directly instead of calling tput
2013-10-28 11:22:34 -07:00
Sam Stephenson
1534201101
Emit ANSI escape sequences directly instead of calling tput
2013-10-28 12:21:16 -05:00
Sam Stephenson
df4def2e67
Reorganize the readme
2013-10-24 12:13:38 -05:00
Peter Aronoff
59a83796c1
Update README to clarify rules about stdout/sterr
...
A short note in the README to explain that users should not write anything
to stdout outside of @test, setup or teardown functions.
Also added a link pointing to the wiki where more information is given
about how Bats evaluates test files.
2013-10-24 07:45:22 -04:00
Sam Stephenson
0e5e445728
Bats 0.3.0
2013-10-21 13:14:24 -05:00
Sam Stephenson
6d1852b85f
Merge pull request #11 from trygvis/master
...
Gitattributes
2013-10-21 10:48:08 -07:00
Sam Stephenson
8930e4e0d1
Fix for test files without trailing newlines ( closes #12 )
2013-10-21 12:45:49 -05:00
Sam Stephenson
02df4f53a8
Readme tweaks
2013-10-21 12:35:07 -05:00
Sam Stephenson
a3229efbfa
Pretty test output for terminals
2013-10-21 12:03:45 -05:00
Sam Stephenson
b0606bc8cd
Don't need duplicate tests for skip
2013-10-21 11:32:36 -05:00
Sam Stephenson
8873aab79f
Extended syntax: "begin" line before each test is run
2013-10-21 11:32:09 -05:00
Sam Stephenson
7849374964
bats_test_info -> bats_test_begin; begin calls setup
2013-10-21 11:21:17 -05:00
Sam Stephenson
a773171777
Don't indent the output of failed tests
2013-10-21 10:58:21 -05:00
Sam Stephenson
c8c56a987c
More descriptive message for failing line and file
2013-10-21 10:57:53 -05:00
Sam Stephenson
f4e09aaa2a
Merge pull request #19 from duggan/internal-skips
...
Support for TAP compliant skip directive inside test blocks.
2013-10-18 14:14:35 -07:00
Ross Duggan
f78324dfec
Support for TAP compliant skip directive inside test blocks.
2013-10-18 22:05:20 +01:00
Sam Stephenson
672f6e4be2
Invoke bats
with multiple files to run an ad-hoc suite
2013-10-18 14:13:00 -05:00
Trygve Laugstøl
caf17fad95
Setting gitattributes for more sane checkouts on Windows/Cygwin.
2013-06-06 13:43:13 +02:00
Sam Stephenson
bc72b85871
Print test file path and line number after a failing test
2013-05-23 12:47:17 -05:00
Sam Stephenson
1be500e4ff
Merge pull request #9 from adamhjk/dos_endings
...
Supporting DOS line endings in BATS tests
2013-05-23 06:41:09 -07:00
Adam Jacob
af9794634f
Using shell redirection rather than cat
2013-05-23 00:52:08 -04:00
Adam Jacob
9c8425d005
Supporting DOS line endings in BATS tests
2013-05-22 21:20:39 -04:00
Sam Stephenson
6116ef6b23
Add a note about Bats.tmbundle
2013-05-03 17:21:15 -05:00
Sam Stephenson
040deba950
Merge pull request #6 from mislav/echo-e-fix
...
fix preprocessing tests that have lines beginning with -e
2013-04-12 14:49:12 -07:00