|
| 1 | +name: shelltestrunner |
| 2 | +version: 0.1 |
| 3 | +category: Testing |
| 4 | +synopsis: A handy tool for testing command-line programs. |
| 5 | +description: |
| 6 | + Run a given program through "shell" tests specifed by |
| 7 | + one or more test files, each of which specifies: |
| 8 | + command-line arguments, input, expected output, |
| 9 | + expected stderr output, and expected exit code. This |
| 10 | + was extracted from the hledger project, and inspired |
| 11 | + by the tests in John Wiegley's ledger project. |
| 12 | + |
| 13 | + This uses test-framework's test runner. Output order |
| 14 | + is currently a bit mixed up. Any command-line options |
| 15 | + are passed through to the test-framework runner, but |
| 16 | + they must not contain spaces, so use eg -tpattern not |
| 17 | + -t pattern. You may be able to get a big speedup by |
| 18 | + running tests in parallel: try -j8. |
| 19 | + |
| 20 | + Usage: |
| 21 | + |
| 22 | + $ shelltestrunner [testrunneropts] executable testfile1 [testfile2 ...] |
| 23 | + |
| 24 | + Test file format: |
| 25 | + |
| 26 | + -opt1 -opt2 arg1 arg2 |
| 27 | + <<< |
| 28 | + 0 or more lines of input |
| 29 | + >>> |
| 30 | + 0 or more lines of expected output |
| 31 | + >>>2 |
| 32 | + 0 or more lines of expected error output |
| 33 | + <<<expected numeric exit code>>> |
| 34 | + |
| 35 | + Lines whose first non-whitespace character is ; are |
| 36 | + ignored, mostly. The first line is the command line, |
| 37 | + to be appended to the executable name. All remaining |
| 38 | + fields are optional; when omitted they are assumed |
| 39 | + to be "", "", "", and 0 respectively. |
| 40 | + |
| 41 | +license: GPL |
| 42 | +-- license-file: LICENSE |
| 43 | +author: Simon Michael < [email protected]> |
| 44 | +maintainer: Simon Michael < [email protected]> |
| 45 | +homepage: http://joyful.com/darcsweb/darcsweb.cgi?r=shelltestrunner |
| 46 | +-- bug-reports: |
| 47 | +stability: experimental |
| 48 | +tested-with: GHC==6.10 |
| 49 | +cabal-version: >= 1.2 |
| 50 | +build-type: Simple |
| 51 | + |
| 52 | +extra-tmp-files: |
| 53 | +extra-source-files: |
| 54 | + |
| 55 | +executable shelltestrunner |
| 56 | + main-is: shelltestrunner.hs |
| 57 | + build-depends: |
| 58 | + base >= 3 && < 5 |
| 59 | + ,parsec |
| 60 | + ,process |
| 61 | + ,HUnit |
| 62 | + ,test-framework |
| 63 | + ,test-framework-hunit >= 0.2 && < 0.3 |
0 commit comments