1
0
mirror of https://github.com/sstephenson/bats.git synced 2024-12-26 14:39:46 +01:00
Commit Graph

45 Commits

Author SHA1 Message Date
Sylvain
5fe46a0893 pull #90 quote every string compare
test are all successful.
2015-01-30 13:08:27 +01:00
Sylvain
1735a4fcd2 saving $IFS in run() not altered for code using it
IFS was modified by run() becoming '\n' and so relying to its bash default
was failing tests.

Also some wrong tests corrected because was relying on this behavior to pass.

Fix #89
2015-01-29 20:51:49 +01:00
Henrique Moody
3be82466a7 Add skipped count tests in the summary
This also update the behaviour of the summary, now it only display the
number of failures, and skipped tests also, if the numbers are greater
than zero.
2014-08-13 14:32:35 +01:00
Sam Stephenson
2c6fed1838 Print the outermost, not innermost, failed command
The outermost command—i.e. the line that failed inside the test case function itself—is more likely to be meaningful at a glance than the innermost command, which might be e.g. the implementation of a helper assertion.
2014-08-12 17:28:03 -05:00
Sam Stephenson
a715fff30a Print filenames relative to the working directory 2014-08-12 16:56:52 -05:00
Sam Stephenson
716d2d62ed Print the failing status code, if it's significant 2014-08-12 16:45:51 -05:00
Andrey Mazo
bbaf0f50df Print failed statement in backtrace
Update tests accordingly.
2014-06-29 00:30:49 +04:00
Sam Stephenson
34b65bb904 Safeguard test teardown (#45) 2014-06-01 20:21:14 -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
Sam Stephenson
1041e46f39 Support single-line test definitions 2013-11-17 13:04:57 -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
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
de1970fb8f Log the full stack trace when a test fails 2013-10-28 15:10:48 -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
8930e4e0d1 Fix for test files without trailing newlines (closes #12) 2013-10-21 12:45:49 -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
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
Sam Stephenson
bc72b85871 Print test file path and line number after a failing test 2013-05-23 12:47:17 -05:00
Adam Jacob
9c8425d005 Supporting DOS line endings in BATS tests 2013-05-22 21:20:39 -04:00
Mislav Marohnić
7cec3d6259 fix preprocessing tests that have lines beginning with -e 2013-04-06 14:01:03 +02:00
Sam Stephenson
04be7dc717 Abort when load is invoked with a nonexistent script 2012-11-16 14:35:48 -06:00
Sam Stephenson
a75495b9dd .gitkeep the empty suite fixture 2012-11-16 14:29:58 -06:00
Sam Stephenson
19a05cc77d Suite support for aggregating multiple tests under a single run 2012-11-16 14:25:45 -06:00
Sam Stephenson
6b965e18c4 bats -c filename prints the number of tests in the file 2012-04-08 23:25:38 -05:00
Sam Stephenson
d591867b35 Add -v/--version 2011-12-30 14:12:15 -06:00
Sam Stephenson
e9d3143fdb Capture stdout/stderr during tests and display it for failures 2011-12-28 23:50:49 -06:00
Sam Stephenson
a4c16fecef Test load 2011-12-28 21:41:23 -06:00
Sam Stephenson
43d1972b0e Test (and fix) that teardown runs once after each test 2011-12-28 21:20:43 -06:00
Sam Stephenson
6e65ef449b Share $TMP with fixtures 2011-12-28 20:58:16 -06:00
Sam Stephenson
aecc6b55dc Test that setup runs once before each test 2011-12-28 20:46:24 -06:00
Sam Stephenson
098d993eb4 Test that each test's environment is isolated 2011-12-28 20:23:52 -06:00
Sam Stephenson
2e52aeff5d Test failing and passing in the same file 2011-12-28 20:06:05 -06:00
Sam Stephenson
ac64e0b18a Test for failing tests 2011-12-28 19:14:10 -06:00
Sam Stephenson
974dbf6a7c [[ isn't a simple command and thus isn't subject to set -e 2011-12-28 18:44:40 -06:00
Sam Stephenson
911367e6d5 Add $lines array 2011-12-28 17:12:37 -06:00
Sam Stephenson
4a71d77813 Shorten test names 2011-12-28 17:12:17 -06:00
Sam Stephenson
b9cfa7470c Initial tests 2011-12-28 16:21:48 -06:00