From 719204b51f41ec1e01faca77e7edd407fbccc92a Mon Sep 17 00:00:00 2001 From: Daniel Aarno Date: Wed, 15 Aug 2012 23:47:54 +0200 Subject: [PATCH] Actually test StringLikeTrait --- examples/test14.cpp | 2 +- tests/runtests.sh | 2 +- tests/test83.out | 1 + tests/test83.sh | 10 ++++++++++ 4 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 tests/test83.out create mode 100644 tests/test83.sh diff --git a/examples/test14.cpp b/examples/test14.cpp index e194845..6f206e8 100644 --- a/examples/test14.cpp +++ b/examples/test14.cpp @@ -31,7 +31,7 @@ struct Vect : public TCLAP::StringLikeTrait { std::ostream& print(std::ostream &os) const { - std::copy(v, v + LEN, std::ostream_iterator(os, " ")); + std::copy(v, v + LEN, std::ostream_iterator(os, ", ")); return os; } diff --git a/tests/runtests.sh b/tests/runtests.sh index 6fb2608..5b77cfd 100644 --- a/tests/runtests.sh +++ b/tests/runtests.sh @@ -6,7 +6,7 @@ cd $DIR let "suc = 0" let "fail = 0" -NUMTEST=82 +NUMTEST=83 for (( tno = 1 ; $tno <= $NUMTEST ; tno = $tno + 1 )); do ./testCheck.sh $tno diff --git a/tests/test83.out b/tests/test83.out new file mode 100644 index 0000000..b5588ec --- /dev/null +++ b/tests/test83.out @@ -0,0 +1 @@ +3.2, -47.11, 0, diff --git a/tests/test83.sh b/tests/test83.sh new file mode 100644 index 0000000..f163365 --- /dev/null +++ b/tests/test83.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +../examples/test14 -v "3.2 -47.11 0" > tmp.out 2>&1 + +if cmp -s tmp.out $srcdir/test83.out; then + exit 0 +else + exit 1 +fi +