From f1df55e8dc1d2298c3d6f4fe7337e12d5bdc3d12 Mon Sep 17 00:00:00 2001 From: mes5k Date: Thu, 8 Jan 2004 04:50:47 +0000 Subject: [PATCH] new tests --- tests/test18.out | 32 ++++++++++++++++++++++++++++++++ tests/test18.sh | 10 ++++++++++ tests/test19.out | 3 +++ tests/test19.sh | 10 ++++++++++ 4 files changed, 55 insertions(+) create mode 100644 tests/test18.out create mode 100755 tests/test18.sh create mode 100644 tests/test19.out create mode 100755 tests/test19.sh diff --git a/tests/test18.out b/tests/test18.out new file mode 100644 index 0000000..d78cf86 --- /dev/null +++ b/tests/test18.out @@ -0,0 +1,32 @@ +PARSE ERROR: Argument: -*s + Couldn't find match for argument + + +USAGE: + + ../examples/test4 [-A] [-B] -s [--] [-v] [-h] + +Where: + + -A, --sA + exist Test B + + -B, --sB + exist Test B + + -s , --Bs + (required) (value required) string test + + --, --ignore_rest + Ignores the rest of the labeled arguments following this flag. + + -v, --version + Displays version information and exits. + + -h, --help + Displays usage information and exits. + + + +this is a message + diff --git a/tests/test18.sh b/tests/test18.sh new file mode 100755 index 0000000..2e50b9b --- /dev/null +++ b/tests/test18.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +../examples/test4 -Bs --Bs asdf > tmp.out 2>&1 + +if cmp -s tmp.out test18.out; then + exit 0 +else + exit 1 +fi + diff --git a/tests/test19.out b/tests/test19.out new file mode 100644 index 0000000..02db97c --- /dev/null +++ b/tests/test19.out @@ -0,0 +1,3 @@ +for string we got : asdf +for bool B we got : 1 +for bool A we got : 1 diff --git a/tests/test19.sh b/tests/test19.sh new file mode 100755 index 0000000..7ef10c4 --- /dev/null +++ b/tests/test19.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +../examples/test4 -BA --Bs asdf > tmp.out 2>&1 + +if cmp -s tmp.out test19.out; then + exit 0 +else + exit 1 +fi +