Commit Graph

13 Commits (master)

Author SHA1 Message Date
Mike Gerwitz e2f011c71d
s/::/:/g function names
The Google coding standard that used `::' was cute and all, but without a
broader framework to surround it (which I do not have time for atm), it's
too much.  `:' seems just as reasonable as a namespace delimiter.
2017-05-10 01:10:23 -04:00
Mike Gerwitz a368e809a3
Support binary comparisons by `expect'
* src/spec.sh
  (__spec_result): Remove variable.
  (__spec_outfile): Add variable.
  (expect): Write stdout to temporary file rather than storing in variable,
    which strips trailing whitespace and does not handle null bytes.
  (shspec::__handle-to): Use `$__spec_outpath'.
  Update copyright years.

* test/test-spec: Add tests for trailing whitespace and binary comparison.
2017-04-19 01:57:42 -04:00
Mike Gerwitz e87d2ff210
Corrected copyright in file headers
Apparently I cannot spell my last name.
2014-06-17 01:35:24 -04:00
Mike Gerwitz aa9044cc97 Began move to shspec::* function naming
This is motivated by Google's shell coding standards and will reduce the
odds of a naming conflict with other functions (which, of course, would
cause terribly odd and difficult-to-find bugs, in both our system and
others').

If this seems like it creates long, overly-verbose function names with no
relief in sight---you're right. I'll have a solution for that in a bit, as a
separate project. ...as a part of my never-ending, growing heap of projects.
2014-06-13 21:34:42 -04:00
Mike Gerwitz 58a3f75d05
run-spec will now set wd to spec dir
This removes sourcing complications
2014-06-09 22:39:30 -04:00
Mike Gerwitz e4abafa8b4
Converted `be' tests into direct expectation handler test
The original implementation was not an expectation handler (for some
reason), so this was an artifact of that approach.
2014-05-13 21:46:00 -04:00
Mike Gerwitz dc5a5d8f0f
Corrected _proxy-to to accept variable shift length 2014-05-13 21:38:30 -04:00
Mike Gerwitz 76e90de26d
Expectation handler no longer receives extra newline 2014-05-13 01:25:24 -04:00
Mike Gerwitz 1dcc0cd8d0
Added `be' support as an expectation handler
E.g. "to be silent".
2014-05-13 01:25:19 -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 d2e8d21ac5
Initial `and' declaration support 2014-05-09 21:48:09 -04:00
Mike Gerwitz b4572d420b
Expectation premise output now piped to expectation handler 2014-05-09 01:59:21 -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