18 Jul
2016
18 Jul
'16
8:16 a.m.
On Friday, 15 July 2016 22:37:29 CEST Richard W.M. Jones wrote:
---
Good idea, just a couple of notes.
+(* Test the Getopt module. The tests are controlled by the + * test-getopt.sh script. + *) + +open Printf + +open Common_utils
Theoretically Getopt is not tied to Common_utils, so it could be tested without it.
+ +t=./getopt_tests + +expect_fail () +{ + if "$@"; then + echo "$@" ": this command was expected to exit with an error" + exit 1 + fi +} + +# Program works. +$t
Just wondering whether GNU expect could be used here. Thanks, -- Pino Toscano