Commit Graph

14 Commits (8389a1f539dfea15ee76716845843317491fdca9)

Author SHA1 Message Date
Mike Gerwitz 8389a1f539
File descriptor 99 is reserved for internal use
It should not, by convention, be used by any test cases; its opening here
will (presumably, at least) prevent the shell from automatically allocating
it for any file operations and subshells.
2014-05-13 01:25:10 -04:00
Mike Gerwitz e3ab1e400e
Added support for stderr param for expectation handlers
This is unfortunately one of the cleanest ways to implement this, since
stdout is piped to stdin of the handler; I did not want to rely on using a
file descriptor, because then you have to deal with issues of rewinding the
pointer for possible future uses, and other considerations.
2014-05-13 01:25:08 -04:00
Mike Gerwitz 61051dc165
Alright, let's get serious about this!
Added license information and boilerplate for build process; no
documentation yet (aside from test cases); it will be added after a bit more
development in standard Texinfo format.
2014-05-13 01:25:02 -04:00
Mike Gerwitz 4b07f88f55
fail procuedure will now output file:line
This is still temporary, but will aid in debugging until a reporter is
created
2014-05-11 21:47:56 -04:00
Mike Gerwitz 89a38a5dc2
Adjusted existing handlers and tests to honor shift argument
This will also ensure that the test cases do not break when new arguments
are added, since the existing conventions will remain unchanged.
2014-05-10 00:42:58 -04:00
Mike Gerwitz b3b3a9fcef
Added shift argument to expectation handlers
This allows the implementation to vary in the number of arguments provided
to the expectation handlers without breaking BC so long as the meanings of
the shifted arguments do not change.
2014-05-10 00:34:01 -04:00
Mike Gerwitz c1d1b66fa9
Added `match' expectation 2014-05-09 23:31:47 -04:00
Mike Gerwitz d2e8d21ac5
Initial `and' declaration support 2014-05-09 21:48:09 -04:00
Mike Gerwitz ca527165aa
Added _bail_clause shorthand
There will be a test for bailing on output's clause shortly, now that we can
assert on output...testing itself.
2014-05-09 02:15:09 -04:00
Mike Gerwitz 08e1d9c889
_bail will now default to current spec caller 2014-05-09 02:14:11 -04:00
Mike Gerwitz 61ecb6ad82
Added output expectation handler 2014-05-09 02:04:09 -04:00
Mike Gerwitz b4572d420b
Expectation premise output now piped to expectation handler 2014-05-09 01:59:21 -04:00
Mike Gerwitz 6dbf996f3b
Exit code now passed to expectation handlers 2014-05-09 01:13:26 -04:00
Mike Gerwitz 3d1f9d22a7
Initial concept and working tests for shspec
My original prototype was more feature-rich than this, but this formalizes
it and provides self-tests.

It is indeed odd seeing shell code that does not look like shell.
2014-05-09 00:58:06 -04:00