From 1127e5ebe3b23fcd6b99fe5f50e9d083c4b247cf Mon Sep 17 00:00:00 2001 From: Snaipe Date: Wed, 11 Mar 2015 19:42:32 +0100 Subject: [PATCH] Added command-line tests --- .gitignore | 1 + samples/Makefile.am | 10 ++++++++++ samples/tests/early_exit.sh | 2 ++ samples/tests/help.sh | 2 ++ samples/tests/tap_test.sh | 2 ++ samples/tests/verbose.sh | 2 ++ 6 files changed, 19 insertions(+) create mode 100755 samples/tests/early_exit.sh create mode 100755 samples/tests/help.sh create mode 100755 samples/tests/tap_test.sh create mode 100755 samples/tests/verbose.sh diff --git a/.gitignore b/.gitignore index 59954bb..a807c71 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ !*.c !*.h !*.rst +!samples/tests/*.sh !LICENSE !HEADER diff --git a/samples/Makefile.am b/samples/Makefile.am index 3fb962a..9781f65 100644 --- a/samples/Makefile.am +++ b/samples/Makefile.am @@ -6,6 +6,16 @@ TESTS = \ asserts \ simple +TESTS += tests/tap_test.sh \ + tests/early_exit.sh \ + tests/verbose.sh \ + tests/help.sh + +tests/tap_test.sh: simple +tests/early_exit.sh: simple +tests/verbose.sh: simple +tests/help.sh: simple + TESTS_ENVIRONMENT = CRITERION_ALWAYS_SUCCEED=1 check_PROGRAMS = $(TESTS) diff --git a/samples/tests/early_exit.sh b/samples/tests/early_exit.sh new file mode 100755 index 0000000..30f513a --- /dev/null +++ b/samples/tests/early_exit.sh @@ -0,0 +1,2 @@ +#!/bin/sh +./simple --no-early-exit --always-succeed diff --git a/samples/tests/help.sh b/samples/tests/help.sh new file mode 100755 index 0000000..21daba7 --- /dev/null +++ b/samples/tests/help.sh @@ -0,0 +1,2 @@ +#!/bin/sh +./simple --help diff --git a/samples/tests/tap_test.sh b/samples/tests/tap_test.sh new file mode 100755 index 0000000..517d3da --- /dev/null +++ b/samples/tests/tap_test.sh @@ -0,0 +1,2 @@ +#!/bin/sh +./simple --tap --always-succeed diff --git a/samples/tests/verbose.sh b/samples/tests/verbose.sh new file mode 100755 index 0000000..73410b8 --- /dev/null +++ b/samples/tests/verbose.sh @@ -0,0 +1,2 @@ +#!/bin/sh +./simple --verbose --always-succeed