diff options
| author | Hans Ulrich Niedermann <hun@n-dimensional.de> | 2008-07-03 22:40:29 +0200 |
|---|---|---|
| committer | Hans Ulrich Niedermann <hun@n-dimensional.de> | 2008-07-15 12:28:56 +0200 |
| commit | 5eff502ced858a7d3a4f3b1c4d44b28e83dc92de (patch) | |
| tree | 86babcca4fc2a521d5c4f19873c3a2ca6af66eae /test | |
| parent | 4b538e4003103171dacaa7a0ac2bad52432cdfbd (diff) | |
Rework command framework
Implies catching exceptions in a single place.
Diffstat (limited to 'test')
| -rw-r--r-- | test/nbb-basic.at | 15 | ||||
| -rw-r--r-- | test/nbb-detect.at | 20 |
2 files changed, 22 insertions, 13 deletions
diff --git a/test/nbb-basic.at b/test/nbb-basic.at index 4da4795..81ebf09 100644 --- a/test/nbb-basic.at +++ b/test/nbb-basic.at @@ -33,9 +33,18 @@ dnl =================================================================== AT_SETUP([nbb basic: no parameters at all]) AT_KEYWORDS([nbb no parameters]) -AT_CHECK([AT_NBB], [2], -[Command line error: nbb requires some arguments -], []) +AT_CHECK([AT_NBB], [2], [], +[ERROR: Command line error: nbb requires some arguments +]) +AT_CLEANUP() + +dnl =================================================================== + +AT_SETUP([nbb basic: unknown command]) +AT_KEYWORDS([nbb unknown command]) +AT_CHECK([AT_NBB this-command-does-not-exist], [2], [], +[ERROR: Unknown nbb command 'this-command-does-not-exist' +]) AT_CLEANUP() dnl =================================================================== diff --git a/test/nbb-detect.at b/test/nbb-detect.at index 0ca3176..d5458f4 100644 --- a/test/nbb-detect.at +++ b/test/nbb-detect.at @@ -8,8 +8,8 @@ dnl =================================================================== AT_SETUP([nbb detect-vcs: no VCS repository type]) AT_KEYWORDS([nbb detect vcs]) AT_CHECK([mkdir test.foo && cd test.foo]) -AT_CHECK([echo "Unknown VCS source tree type: '$PWD/test.foo'" > expout -cd test.foo && AT_NBB detect-vcs], [1], [expout]) +AT_CHECK([echo "ERROR: Unknown VCS source tree type: '$PWD/test.foo'" > experr +cd test.foo && AT_NBB detect-vcs], [1], [], [experr]) AT_CHECK([rm -rf test.foo]) AT_CLEANUP() @@ -46,11 +46,11 @@ AT_CHECK([cd test.bzrgit && bzr init && bzr nick testnick]) AT_CHECK([cd test.bzrgit && git init], [0], [Initialized empty Git repository in .git/ ]) -AT_CHECK([echo "Ambigous VCS types detected for '$PWD/test.bzrgit': +AT_CHECK([echo "ERROR: Ambigous VCS types detected for '$PWD/test.bzrgit': VCS type Branch name git master - bzr testnick" > expout -cd test.bzrgit && AT_NBB detect-vcs], [1], [expout]) + bzr testnick" > experr +cd test.bzrgit && AT_NBB detect-vcs], [1], [], [experr]) AT_CHECK([rm -rf test.bzrgit]) AT_CLEANUP() @@ -102,10 +102,10 @@ AC[_]OUTPUT AT_DATA([test.git/SConstruct], [dnl # Test ]) -AT_CHECK([echo "Ambigous BS types detected for '$PWD/test.git': +AT_CHECK([echo "ERROR: Ambigous BS types detected for '$PWD/test.git': automake - scons" > expout -cd test.git && AT_NBB detect-bs], [1], [expout]) + scons" > experr +cd test.git && AT_NBB detect-bs], [1], [], [experr]) AT_CHECK([rm -rf test.git]) AT_CLEANUP() @@ -117,8 +117,8 @@ AT_CHECK([mkdir test.git && cd test.git]) AT_CHECK([cd test.git && git init], [0], [Initialized empty Git repository in .git/ ]) -AT_CHECK([echo "Unknown BS source tree type: '$PWD/test.git'" > expout -cd test.git && AT_NBB detect-bs], [1], [expout]) +AT_CHECK([echo "ERROR: Unknown BS source tree type: '$PWD/test.git'" > experr +cd test.git && AT_NBB detect-bs], [1], [], [experr]) AT_CHECK([rm -rf test.git]) AT_CLEANUP() |
