From b239b8845a7b2fb11573449fae346a795b1e2339 Mon Sep 17 00:00:00 2001
From: Daniel Aarno
Date: Mon, 19 Mar 2018 09:07:01 +0000
Subject: [PATCH 01/12] Point people to the forum/tickets instead of to Mike.
---
docs/index.html | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/index.html b/docs/index.html
index ffa3dd2..4546ff0 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -79,8 +79,8 @@ Please don't let any apparent project inactivity discourage you
from using the software!
-Don't hesitate to
- send us your feedback!
+Don't hesitate to
+send us your feedback!
From c937a87071f213d4628dd57a4e7b32322d8a5e3a Mon Sep 17 00:00:00 2001
From: Daniel Aarno
Date: Mon, 19 Mar 2018 09:42:45 +0000
Subject: [PATCH 02/12] Added script to upload documentation to SF
---
docs/upload.sh | 4 ++++
1 file changed, 4 insertions(+)
create mode 100755 docs/upload.sh
diff --git a/docs/upload.sh b/docs/upload.sh
new file mode 100755
index 0000000..7dfeb3a
--- /dev/null
+++ b/docs/upload.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+rsync -aP html index.html manual.html style.css \
+ $USER@web.sourceforge.net:/home/project-web/tclap/htdocs
From 81bba06d202d726636ade5e31ccbc068162ca996 Mon Sep 17 00:00:00 2001
From: Daniel Aarno
Date: Mon, 19 Mar 2018 10:12:25 +0000
Subject: [PATCH 03/12] Add emacs mode-lines to all test files
---
examples/test1.cpp | 2 ++
examples/test10.cpp | 2 ++
examples/test11.cpp | 2 ++
examples/test12.cpp | 2 ++
examples/test13.cpp | 2 ++
examples/test14.cpp | 2 ++
examples/test15.cpp | 2 ++
examples/test16.cpp | 2 ++
examples/test17-a.cpp | 2 ++
examples/test17.cpp | 2 ++
examples/test18.cpp | 2 ++
examples/test19.cpp | 2 ++
examples/test2.cpp | 2 +-
examples/test20.cpp | 2 ++
examples/test21.cpp | 2 ++
examples/test3.cpp | 2 +-
examples/test4.cpp | 2 ++
examples/test5.cpp | 2 ++
examples/test6.cpp | 2 ++
examples/test7.cpp | 2 ++
examples/test8.cpp | 2 ++
examples/test9.cpp | 2 ++
22 files changed, 42 insertions(+), 2 deletions(-)
diff --git a/examples/test1.cpp b/examples/test1.cpp
index bf87af4..81e873b 100644
--- a/examples/test1.cpp
+++ b/examples/test1.cpp
@@ -1,3 +1,5 @@
+// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
+
#include
#include
#include
diff --git a/examples/test10.cpp b/examples/test10.cpp
index 8425854..0d18a76 100644
--- a/examples/test10.cpp
+++ b/examples/test10.cpp
@@ -1,3 +1,5 @@
+// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
+
// Test only makes sure we can use different argv types for the
// parser. Don't run, just compile.
diff --git a/examples/test11.cpp b/examples/test11.cpp
index 71ae4ac..e20d87a 100644
--- a/examples/test11.cpp
+++ b/examples/test11.cpp
@@ -1,3 +1,5 @@
+// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
+
#include "tclap/CmdLine.h"
#include
diff --git a/examples/test12.cpp b/examples/test12.cpp
index 20447a7..dd51b47 100644
--- a/examples/test12.cpp
+++ b/examples/test12.cpp
@@ -1,3 +1,5 @@
+// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
+
#include "tclap/CmdLine.h"
#include
#include
diff --git a/examples/test13.cpp b/examples/test13.cpp
index 12fa8bc..bcb64d5 100644
--- a/examples/test13.cpp
+++ b/examples/test13.cpp
@@ -1,3 +1,5 @@
+// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
+
#include
#include
diff --git a/examples/test14.cpp b/examples/test14.cpp
index c33e5c0..179d730 100644
--- a/examples/test14.cpp
+++ b/examples/test14.cpp
@@ -1,3 +1,5 @@
+// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
+
#include "tclap/CmdLine.h"
#include
#include
diff --git a/examples/test15.cpp b/examples/test15.cpp
index ec9dc11..d681f00 100644
--- a/examples/test15.cpp
+++ b/examples/test15.cpp
@@ -1,3 +1,5 @@
+// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
+
#include "tclap/CmdLine.h"
#include
#include
diff --git a/examples/test16.cpp b/examples/test16.cpp
index d0c9dab..a3a3b77 100644
--- a/examples/test16.cpp
+++ b/examples/test16.cpp
@@ -1,3 +1,5 @@
+// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
+
#include "tclap/CmdLine.h"
#include
#include
diff --git a/examples/test17-a.cpp b/examples/test17-a.cpp
index f1b6354..9d3279f 100644
--- a/examples/test17-a.cpp
+++ b/examples/test17-a.cpp
@@ -1 +1,3 @@
+// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
+
#include
diff --git a/examples/test17.cpp b/examples/test17.cpp
index b394f76..2eff281 100644
--- a/examples/test17.cpp
+++ b/examples/test17.cpp
@@ -1,3 +1,5 @@
+// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
+
#include
int main() { }
diff --git a/examples/test18.cpp b/examples/test18.cpp
index f797745..fad25de 100644
--- a/examples/test18.cpp
+++ b/examples/test18.cpp
@@ -1,3 +1,5 @@
+// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
+
#include
#include
#include
diff --git a/examples/test19.cpp b/examples/test19.cpp
index 5513e78..cda29bd 100644
--- a/examples/test19.cpp
+++ b/examples/test19.cpp
@@ -1,3 +1,5 @@
+// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
+
#define TCLAP_SETBASE_ZERO 1
diff --git a/examples/test2.cpp b/examples/test2.cpp
index 404cecd..50dacc4 100644
--- a/examples/test2.cpp
+++ b/examples/test2.cpp
@@ -1,4 +1,4 @@
-
+// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
#include "tclap/CmdLine.h"
#include
diff --git a/examples/test20.cpp b/examples/test20.cpp
index 38c0307..879039f 100644
--- a/examples/test20.cpp
+++ b/examples/test20.cpp
@@ -1,3 +1,5 @@
+// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
+
#include
#include
#include
diff --git a/examples/test21.cpp b/examples/test21.cpp
index 1d49cd2..b4921d1 100644
--- a/examples/test21.cpp
+++ b/examples/test21.cpp
@@ -1,3 +1,5 @@
+// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
+
// This illustrates how to change the flag and name start strings.
// Note that these defines need to happen *before* tclap is included!
diff --git a/examples/test3.cpp b/examples/test3.cpp
index 9602e64..11e00af 100644
--- a/examples/test3.cpp
+++ b/examples/test3.cpp
@@ -1,4 +1,4 @@
-
+// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
#include "tclap/CmdLine.h"
#include
diff --git a/examples/test4.cpp b/examples/test4.cpp
index a1dd88e..1d89133 100644
--- a/examples/test4.cpp
+++ b/examples/test4.cpp
@@ -1,3 +1,5 @@
+// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
+
#include "tclap/CmdLine.h"
diff --git a/examples/test5.cpp b/examples/test5.cpp
index ebc5e4a..68c38b3 100644
--- a/examples/test5.cpp
+++ b/examples/test5.cpp
@@ -1,3 +1,5 @@
+// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
+
#include "tclap/CmdLine.h"
diff --git a/examples/test6.cpp b/examples/test6.cpp
index b792265..05cc8d9 100644
--- a/examples/test6.cpp
+++ b/examples/test6.cpp
@@ -1,3 +1,5 @@
+// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
+
#include
#include "tclap/CmdLine.h"
diff --git a/examples/test7.cpp b/examples/test7.cpp
index 0d91e6e..7ea48ee 100644
--- a/examples/test7.cpp
+++ b/examples/test7.cpp
@@ -1,3 +1,5 @@
+// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
+
#include
#include "tclap/CmdLine.h"
diff --git a/examples/test8.cpp b/examples/test8.cpp
index 6063e02..187cc83 100644
--- a/examples/test8.cpp
+++ b/examples/test8.cpp
@@ -1,3 +1,5 @@
+// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
+
#include "tclap/CmdLine.h"
diff --git a/examples/test9.cpp b/examples/test9.cpp
index 8d9e64e..27a1359 100644
--- a/examples/test9.cpp
+++ b/examples/test9.cpp
@@ -1,3 +1,5 @@
+// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
+
#include
#include
#include
From 81e4e8bba5fb7708573aa70bce49ecc92f9fe551 Mon Sep 17 00:00:00 2001
From: Daniel Aarno
Date: Mon, 19 Mar 2018 10:13:46 +0000
Subject: [PATCH 04/12] Add emacs mode-lines to all header files
---
include/tclap/CmdLineInterface.h | 2 ++
include/tclap/CmdLineOutput.h | 2 ++
include/tclap/Constraint.h | 2 ++
include/tclap/HelpVisitor.h | 2 ++
include/tclap/IgnoreRestVisitor.h | 2 ++
include/tclap/MultiArg.h | 2 ++
include/tclap/MultiSwitchArg.h | 2 ++
include/tclap/OptionalUnlabeledTracker.h | 2 ++
include/tclap/SwitchArg.h | 2 ++
include/tclap/UnlabeledMultiArg.h | 2 ++
include/tclap/UnlabeledValueArg.h | 2 ++
include/tclap/ValueArg.h | 2 ++
include/tclap/ValuesConstraint.h | 2 ++
include/tclap/Visitor.h | 2 ++
include/tclap/XorHandler.h | 2 ++
15 files changed, 30 insertions(+)
diff --git a/include/tclap/CmdLineInterface.h b/include/tclap/CmdLineInterface.h
index cf60f34..8aa55f8 100644
--- a/include/tclap/CmdLineInterface.h
+++ b/include/tclap/CmdLineInterface.h
@@ -1,3 +1,5 @@
+// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
+
/******************************************************************************
*
diff --git a/include/tclap/CmdLineOutput.h b/include/tclap/CmdLineOutput.h
index 11b8939..a25bd37 100644
--- a/include/tclap/CmdLineOutput.h
+++ b/include/tclap/CmdLineOutput.h
@@ -1,3 +1,5 @@
+// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
+
/******************************************************************************
diff --git a/include/tclap/Constraint.h b/include/tclap/Constraint.h
index 21dc06f..0816064 100644
--- a/include/tclap/Constraint.h
+++ b/include/tclap/Constraint.h
@@ -1,3 +1,5 @@
+// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
+
/******************************************************************************
*
diff --git a/include/tclap/HelpVisitor.h b/include/tclap/HelpVisitor.h
index ee09144..5ee3756 100644
--- a/include/tclap/HelpVisitor.h
+++ b/include/tclap/HelpVisitor.h
@@ -1,3 +1,5 @@
+// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
+
/******************************************************************************
*
diff --git a/include/tclap/IgnoreRestVisitor.h b/include/tclap/IgnoreRestVisitor.h
index d20f6e0..1824c3c 100644
--- a/include/tclap/IgnoreRestVisitor.h
+++ b/include/tclap/IgnoreRestVisitor.h
@@ -1,3 +1,5 @@
+// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
+
/******************************************************************************
*
diff --git a/include/tclap/MultiArg.h b/include/tclap/MultiArg.h
index d478df9..dd41ebd 100644
--- a/include/tclap/MultiArg.h
+++ b/include/tclap/MultiArg.h
@@ -1,3 +1,5 @@
+// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
+
/******************************************************************************
*
* file: MultiArg.h
diff --git a/include/tclap/MultiSwitchArg.h b/include/tclap/MultiSwitchArg.h
index 208d998..51f5055 100644
--- a/include/tclap/MultiSwitchArg.h
+++ b/include/tclap/MultiSwitchArg.h
@@ -1,3 +1,5 @@
+// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
+
/******************************************************************************
*
diff --git a/include/tclap/OptionalUnlabeledTracker.h b/include/tclap/OptionalUnlabeledTracker.h
index 92f8929..aa64116 100644
--- a/include/tclap/OptionalUnlabeledTracker.h
+++ b/include/tclap/OptionalUnlabeledTracker.h
@@ -1,3 +1,5 @@
+// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
+
/******************************************************************************
diff --git a/include/tclap/SwitchArg.h b/include/tclap/SwitchArg.h
index c2e8395..972939c 100644
--- a/include/tclap/SwitchArg.h
+++ b/include/tclap/SwitchArg.h
@@ -1,3 +1,5 @@
+// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
+
/******************************************************************************
*
diff --git a/include/tclap/UnlabeledMultiArg.h b/include/tclap/UnlabeledMultiArg.h
index 7995bc2..6b406b8 100644
--- a/include/tclap/UnlabeledMultiArg.h
+++ b/include/tclap/UnlabeledMultiArg.h
@@ -1,3 +1,5 @@
+// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
+
/******************************************************************************
*
diff --git a/include/tclap/UnlabeledValueArg.h b/include/tclap/UnlabeledValueArg.h
index 25e85ff..6fdbff3 100644
--- a/include/tclap/UnlabeledValueArg.h
+++ b/include/tclap/UnlabeledValueArg.h
@@ -1,3 +1,5 @@
+// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
+
/******************************************************************************
*
diff --git a/include/tclap/ValueArg.h b/include/tclap/ValueArg.h
index 2f65e4c..a97a918 100644
--- a/include/tclap/ValueArg.h
+++ b/include/tclap/ValueArg.h
@@ -1,3 +1,5 @@
+// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
+
/******************************************************************************
*
* file: ValueArg.h
diff --git a/include/tclap/ValuesConstraint.h b/include/tclap/ValuesConstraint.h
index cff90be..a234297 100644
--- a/include/tclap/ValuesConstraint.h
+++ b/include/tclap/ValuesConstraint.h
@@ -1,3 +1,5 @@
+// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
+
/******************************************************************************
diff --git a/include/tclap/Visitor.h b/include/tclap/Visitor.h
index 393320a..935fddb 100644
--- a/include/tclap/Visitor.h
+++ b/include/tclap/Visitor.h
@@ -1,3 +1,5 @@
+// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
+
/******************************************************************************
*
diff --git a/include/tclap/XorHandler.h b/include/tclap/XorHandler.h
index 64fcffc..7191681 100644
--- a/include/tclap/XorHandler.h
+++ b/include/tclap/XorHandler.h
@@ -1,3 +1,5 @@
+// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
+
/******************************************************************************
*
From 6db23c03b5dbc5ba60998527c1cd62f13466a4c7 Mon Sep 17 00:00:00 2001
From: Daniel Aarno
Date: Sat, 28 Jul 2018 18:09:56 +0100
Subject: [PATCH 05/12] Break out some common test code to a separate file.
Next step to refactor remaining tests.
---
tests/simple-test.sh | 19 +++++++++++++++++++
tests/test1.sh | 10 +---------
2 files changed, 20 insertions(+), 9 deletions(-)
create mode 100755 tests/simple-test.sh
diff --git a/tests/simple-test.sh b/tests/simple-test.sh
new file mode 100755
index 0000000..89545ef
--- /dev/null
+++ b/tests/simple-test.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+if [ -z "$srcdir" ]; then
+ srcdir=`dirname $0`
+fi
+
+TEST_RESULT=$srcdir/$1
+shift
+
+../examples/"$@" 2>&1 | tee tmp.out
+
+if cmp -s tmp.out $TEST_RESULT.out; then
+ echo "OK"
+ exit 0
+else
+ echo "FAIL"
+ diff tmp.out $TEST_RESULT.out
+ exit 1
+fi
diff --git a/tests/test1.sh b/tests/test1.sh
index f59f014..5805886 100755
--- a/tests/test1.sh
+++ b/tests/test1.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-# success
-../examples/test1 -r -n mike > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test1.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh test1 `basename $0 .sh` -r -n mike
From 7b519175927d76a887568dec44fcddf91d5a8ea2 Mon Sep 17 00:00:00 2001
From: Daniel Aarno
Date: Mon, 30 Jul 2018 14:18:20 +0100
Subject: [PATCH 06/12] Hide intermediate test files from git.
---
.gitignore | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.gitignore b/.gitignore
index 81ef64a..5d19ea9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,3 +22,5 @@ examples/test[0-9]
Makefile
tclap.pc
tests/tmp.out
+tests/test*.log
+tests/test*.trs
From f327450dd59b1db7a05a214e8124871913b771bd Mon Sep 17 00:00:00 2001
From: Daniel Aarno
Date: Mon, 30 Jul 2018 14:18:57 +0100
Subject: [PATCH 07/12] Script to add emacs mode line to all files
---
scripts/modeline.py | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 scripts/modeline.py
diff --git a/scripts/modeline.py b/scripts/modeline.py
new file mode 100644
index 0000000..af2f38d
--- /dev/null
+++ b/scripts/modeline.py
@@ -0,0 +1,16 @@
+import sys
+
+modline = "// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-\n\n"
+
+for path in sys.argv[1:]:
+ lines = [modline]
+ with file(path) as f:
+ lines += f.readlines()
+
+ has_modeline = any([l for l in lines[1:] if l.find('Mode: c++') != -1])
+ if has_modeline:
+ continue
+
+ with file(path, 'w') as f:
+ for line in lines:
+ f.write(line)
From b39f11f01df6b989fe4ee65f25062814517da3db Mon Sep 17 00:00:00 2001
From: Daniel Aarno
Date: Mon, 30 Jul 2018 14:19:55 +0100
Subject: [PATCH 08/12] Hide test-driver (temporary binary) from git
---
.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/.gitignore b/.gitignore
index 5d19ea9..4bb7ddb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,3 +24,4 @@ tclap.pc
tests/tmp.out
tests/test*.log
tests/test*.trs
+config/test-driver
From eb877b0fabe7ffff2fc021d1122980ba7ac52521 Mon Sep 17 00:00:00 2001
From: Daniel Aarno
Date: Mon, 30 Jul 2018 14:20:18 +0100
Subject: [PATCH 09/12] Script to simlify all tests
---
scripts/fix-test.py | 63 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 63 insertions(+)
create mode 100755 scripts/fix-test.py
diff --git a/scripts/fix-test.py b/scripts/fix-test.py
new file mode 100755
index 0000000..75f3167
--- /dev/null
+++ b/scripts/fix-test.py
@@ -0,0 +1,63 @@
+#!/usr/bin/python
+
+# Copyright (c) 2018 Google LLC
+# All rights reserved.
+#
+# See the file COPYING in the top directory of this distribution for
+# more information.
+#
+# THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+
+import sys
+import re
+
+def process_file(path):
+ args = None
+ out = None
+ test = None
+
+ lines = []
+
+ with open(path) as f:
+ for line in f.readlines():
+ if line.startswith('#'):
+ lines.append(line)
+ continue
+
+ m = re.match(r'../examples/(test[0-9]+) (.*) > tmp.out.*', line)
+ if m:
+ (test, args) = m.groups()
+ lines.append("./simple-test.sh `basename $0 .sh` %s %s\n"
+ % (test, args))
+ continue
+
+ m = re.match(r'../examples/(test[0-9]+) > tmp.out.*', line)
+ if m:
+ test = m.group(1)
+ args = ""
+ lines.append("./simple-test.sh `basename $0 .sh` %s\n"
+ % test)
+
+ continue
+
+ m = re.match(r'.*(test[0-9]+).out.*', line)
+ if m:
+ out = m.group(1)
+
+ if not all([v != None for v in [out, test, args]]):
+ print "Failed to parse", path
+ print out, test, args
+ return
+
+ with open(path, 'w') as f:
+ for line in lines:
+ f.write(line)
+
+for path in sys.argv[1:]:
+ process_file(path)
From 1dcad08845ba0febbb9832c474358b86c9f9c360 Mon Sep 17 00:00:00 2001
From: Daniel Aarno
Date: Mon, 30 Jul 2018 18:06:25 +0100
Subject: [PATCH 10/12] Simplify tests by using common test script.
This reduces duplicated checking logic between each test and makes it easier
to run and check result of individual tests.
---
tests/test10.sh | 10 +---------
tests/test11.sh | 10 +---------
tests/test12.sh | 10 +---------
tests/test13.sh | 10 +---------
tests/test14.sh | 10 +---------
tests/test15.sh | 10 +---------
tests/test16.sh | 10 +---------
tests/test17.sh | 10 +---------
tests/test18.sh | 10 +---------
tests/test19.sh | 10 +---------
tests/test2.sh | 10 +---------
tests/test20.sh | 10 +---------
tests/test21.sh | 10 +---------
tests/test22.sh | 10 +---------
tests/test23.sh | 10 +---------
tests/test24.sh | 10 +---------
tests/test25.sh | 10 +---------
tests/test26.sh | 10 +---------
tests/test27.sh | 10 +---------
tests/test28.sh | 10 +---------
tests/test29.sh | 10 +---------
tests/test3.sh | 10 +---------
tests/test30.sh | 10 +---------
tests/test31.sh | 10 +---------
tests/test32.sh | 10 +---------
tests/test33.sh | 10 +---------
tests/test34.sh | 10 +---------
tests/test35.sh | 10 +---------
tests/test36.sh | 10 +---------
tests/test37.sh | 10 +---------
tests/test38.sh | 10 +---------
tests/test39.sh | 10 +---------
tests/test4.sh | 10 +---------
tests/test40.sh | 10 +---------
tests/test41.sh | 10 +---------
tests/test42.sh | 10 +---------
tests/test43.sh | 10 +---------
tests/test44.sh | 10 +---------
tests/test45.sh | 10 +---------
tests/test46.sh | 10 +---------
tests/test47.sh | 10 +---------
tests/test48.sh | 10 +---------
tests/test49.sh | 10 +---------
tests/test5.sh | 10 +---------
tests/test50.sh | 10 +---------
tests/test51.sh | 10 +---------
tests/test52.sh | 10 +---------
tests/test53.sh | 10 +---------
tests/test54.sh | 10 +---------
tests/test55.sh | 10 +---------
tests/test56.sh | 10 +---------
tests/test57.sh | 10 +---------
tests/test58.sh | 10 +---------
tests/test59.sh | 10 +---------
tests/test6.sh | 10 +---------
tests/test60.sh | 10 +---------
tests/test61.sh | 10 +---------
tests/test62.sh | 10 +---------
tests/test63.sh | 10 +---------
tests/test64.sh | 10 +---------
tests/test65.sh | 13 ++-----------
tests/test66.sh | 10 +---------
tests/test67.sh | 10 +---------
tests/test68.sh | 10 +---------
tests/test69.sh | 10 +---------
tests/test7.sh | 10 +---------
tests/test70.sh | 10 +---------
tests/test71.sh | 10 +---------
tests/test72.sh | 10 +---------
tests/test73.sh | 10 +---------
tests/test74.sh | 10 +---------
tests/test75.sh | 10 +---------
tests/test76.sh | 10 +---------
tests/test77.sh | 10 +---------
tests/test78.sh | 10 +---------
tests/test79.sh | 10 +---------
tests/test8.sh | 10 +---------
tests/test9.sh | 10 +---------
78 files changed, 79 insertions(+), 704 deletions(-)
diff --git a/tests/test10.sh b/tests/test10.sh
index 8d9f545..d3e9f92 100755
--- a/tests/test10.sh
+++ b/tests/test10.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# failure
-../examples/test2 -i 10 -s hello > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test10.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test2 -i 10 -s hello
diff --git a/tests/test11.sh b/tests/test11.sh
index 3151d76..7d3faa8 100755
--- a/tests/test11.sh
+++ b/tests/test11.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# failure
-../examples/test2 -i 10 -s hello -i 9 > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test11.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test2 -i 10 -s hello -i 9
diff --git a/tests/test12.sh b/tests/test12.sh
index 1c23d09..57c36a8 100755
--- a/tests/test12.sh
+++ b/tests/test12.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# failure
-../examples/test2 -i 10 -s hello -f nine > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test12.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test2 -i 10 -s hello -f nine
diff --git a/tests/test13.sh b/tests/test13.sh
index 8631460..3f8b8f4 100755
--- a/tests/test13.sh
+++ b/tests/test13.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# success
-../examples/test3 --stringTest=bill -i=9 -i=8 -B homer marge bart > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test13.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test3 --stringTest=bill -i=9 -i=8 -B homer marge bart
diff --git a/tests/test14.sh b/tests/test14.sh
index 4a3c106..6de1bb6 100755
--- a/tests/test14.sh
+++ b/tests/test14.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# success
-../examples/test3 --stringTest=aaa homer marge bart -- one two > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test14.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test3 --stringTest=aaa homer marge bart -- one two
diff --git a/tests/test15.sh b/tests/test15.sh
index 5c2e09d..4c3fbb6 100755
--- a/tests/test15.sh
+++ b/tests/test15.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# failure
-../examples/test3 --stringTest bbb homer marge bart -- -hv two > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test15.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test3 --stringTest bbb homer marge bart -- -hv two
diff --git a/tests/test16.sh b/tests/test16.sh
index 217e258..6646a17 100755
--- a/tests/test16.sh
+++ b/tests/test16.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# failure
-../examples/test3 --stringTest one homer -B -Bh > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test16.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test3 --stringTest one homer -B -Bh
diff --git a/tests/test17.sh b/tests/test17.sh
index b876dec..45b71c4 100755
--- a/tests/test17.sh
+++ b/tests/test17.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# failure
-../examples/test3 --stringTest=one homer -B > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test17.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test3 --stringTest=one homer -B
diff --git a/tests/test18.sh b/tests/test18.sh
index ebc8646..0e4c930 100755
--- a/tests/test18.sh
+++ b/tests/test18.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# failure
-../examples/test4 -Bs --Bs asdf > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test18.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test4 -Bs --Bs asdf
diff --git a/tests/test19.sh b/tests/test19.sh
index 759d997..d22ce7f 100755
--- a/tests/test19.sh
+++ b/tests/test19.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# success
-../examples/test4 -BA --Bs asdf > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test19.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test4 -BA --Bs asdf
diff --git a/tests/test2.sh b/tests/test2.sh
index 729970e..d293b6b 100755
--- a/tests/test2.sh
+++ b/tests/test2.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# success
-../examples/test1 -n mike > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test2.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test1 -n mike
diff --git a/tests/test20.sh b/tests/test20.sh
index ab1af77..c78ed73 100755
--- a/tests/test20.sh
+++ b/tests/test20.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# success
-../examples/test5 -a asdf -c fdas --eee blah -i sss -i fdsf > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test20.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test5 -a asdf -c fdas --eee blah -i sss -i fdsf
diff --git a/tests/test21.sh b/tests/test21.sh
index eca74e9..2924938 100755
--- a/tests/test21.sh
+++ b/tests/test21.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# success
-../examples/test5 -b asdf -c fdas -g asdf -j homer > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test21.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test5 -b asdf -c fdas -g asdf -j homer
diff --git a/tests/test22.sh b/tests/test22.sh
index bdbcb26..ee01f9c 100755
--- a/tests/test22.sh
+++ b/tests/test22.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# failure
-../examples/test5 -a fdsa -b asdf -c fdas > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test22.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test5 -a fdsa -b asdf -c fdas
diff --git a/tests/test23.sh b/tests/test23.sh
index df67794..67ff31b 100755
--- a/tests/test23.sh
+++ b/tests/test23.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# failure
-../examples/test5 -d junk -c fdas > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test23.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test5 -d junk -c fdas
diff --git a/tests/test24.sh b/tests/test24.sh
index d935ec7..3e196c9 100755
--- a/tests/test24.sh
+++ b/tests/test24.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# failure
-../examples/test5 --aaa dilbert -b asdf -c fdas > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test24.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test5 --aaa dilbert -b asdf -c fdas
diff --git a/tests/test25.sh b/tests/test25.sh
index 10c4b80..f1c930a 100755
--- a/tests/test25.sh
+++ b/tests/test25.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# success
-../examples/test5 --aaa asdf -c fdas --fff blah -i one -i two > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test25.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test5 --aaa asdf -c fdas --fff blah -i one -i two
diff --git a/tests/test26.sh b/tests/test26.sh
index 9043b83..894d1af 100755
--- a/tests/test26.sh
+++ b/tests/test26.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# failure
-../examples/test2 -i 2 -f 4..2 -s asdf asdf > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test26.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test2 -i 2 -f 4..2 -s asdf asdf
diff --git a/tests/test27.sh b/tests/test27.sh
index 81908a3..04d5f0d 100755
--- a/tests/test27.sh
+++ b/tests/test27.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# failure
-../examples/test2 -i 2 -f 4.0.2 -s asdf asdf > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test27.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test2 -i 2 -f 4.0.2 -s asdf asdf
diff --git a/tests/test28.sh b/tests/test28.sh
index bdf1d05..b0315ab 100755
--- a/tests/test28.sh
+++ b/tests/test28.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# failure
-../examples/test2 -i 2a -f 4.2 -s asdf asdf > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test28.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test2 -i 2a -f 4.2 -s asdf asdf
diff --git a/tests/test29.sh b/tests/test29.sh
index 15982d8..7ba1728 100755
--- a/tests/test29.sh
+++ b/tests/test29.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# failure... no hex here, but see test19.cpp for how to use hex
-../examples/test2 -i 0xA -f 4.2 -s asdf asdf > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test29.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test2 -i 0xA -f 4.2 -s asdf asdf
diff --git a/tests/test3.sh b/tests/test3.sh
index 26ccacf..041f120 100755
--- a/tests/test3.sh
+++ b/tests/test3.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# success
-../examples/test1 -n mike -r > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test3.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test1 -n mike -r
diff --git a/tests/test30.sh b/tests/test30.sh
index f7c9709..a2575e6 100755
--- a/tests/test30.sh
+++ b/tests/test30.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# failure
-../examples/test2 -i 2.1 -f 4.2 -s asdf asdf > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test30.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test2 -i 2.1 -f 4.2 -s asdf asdf
diff --git a/tests/test31.sh b/tests/test31.sh
index 07259ea..2a8e46e 100755
--- a/tests/test31.sh
+++ b/tests/test31.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# failure
-../examples/test3 -i=9a -i=1 -s=asdf asdf asdf > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test31.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test3 -i=9a -i=1 -s=asdf asdf asdf
diff --git a/tests/test32.sh b/tests/test32.sh
index 87c12c2..c6ec68a 100755
--- a/tests/test32.sh
+++ b/tests/test32.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# failure
-../examples/test3 -f=9 -f=1.0.0 -s=asdf asdf asdf > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test32.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test3 -f=9 -f=1.0.0 -s=asdf asdf asdf
diff --git a/tests/test33.sh b/tests/test33.sh
index 210cd09..58adb5f 100755
--- a/tests/test33.sh
+++ b/tests/test33.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# success
-../examples/test5 -a asdf -c fdas --eee blah --ddd -j o --jjj t > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test33.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test5 -a asdf -c fdas --eee blah --ddd -j o --jjj t
diff --git a/tests/test34.sh b/tests/test34.sh
index a9d4bc1..b115150 100755
--- a/tests/test34.sh
+++ b/tests/test34.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# success
-../examples/test6 -n homer 2 > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test34.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test6 -n homer 2
diff --git a/tests/test35.sh b/tests/test35.sh
index db6032e..789a193 100755
--- a/tests/test35.sh
+++ b/tests/test35.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# failure
-../examples/test6 -n mike 2 > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test35.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test6 -n mike 2
diff --git a/tests/test36.sh b/tests/test36.sh
index 4ead7ef..485a81c 100755
--- a/tests/test36.sh
+++ b/tests/test36.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# failure
-../examples/test6 -n homer 6 > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test36.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test6 -n homer 6
diff --git a/tests/test37.sh b/tests/test37.sh
index 865fa11..6c3ba7a 100755
--- a/tests/test37.sh
+++ b/tests/test37.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# success
-../examples/test7 -n homer 2 -n marge 1 3 > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test37.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test7 -n homer 2 -n marge 1 3
diff --git a/tests/test38.sh b/tests/test38.sh
index f453af7..78ec7d3 100755
--- a/tests/test38.sh
+++ b/tests/test38.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# failure
-../examples/test7 -n mike 2 1 > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test38.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test7 -n mike 2 1
diff --git a/tests/test39.sh b/tests/test39.sh
index 8b77d3e..0c84f29 100755
--- a/tests/test39.sh
+++ b/tests/test39.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# failure
-../examples/test7 2 -n homer -n bart 6 > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test39.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test7 2 -n homer -n bart 6
diff --git a/tests/test4.sh b/tests/test4.sh
index afaedc7..68a0c93 100755
--- a/tests/test4.sh
+++ b/tests/test4.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# failure
-../examples/test1 > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test4.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test1
diff --git a/tests/test40.sh b/tests/test40.sh
index 592e001..9f04234 100755
--- a/tests/test40.sh
+++ b/tests/test40.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# success
-../examples/test1 --help > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test40.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test1 --help
diff --git a/tests/test41.sh b/tests/test41.sh
index 7ebc153..50563b6 100755
--- a/tests/test41.sh
+++ b/tests/test41.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# success
-../examples/test2 --help > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test41.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test2 --help
diff --git a/tests/test42.sh b/tests/test42.sh
index 1556498..10751de 100755
--- a/tests/test42.sh
+++ b/tests/test42.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# success
-../examples/test3 --help > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test42.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test3 --help
diff --git a/tests/test43.sh b/tests/test43.sh
index dba057f..879947f 100755
--- a/tests/test43.sh
+++ b/tests/test43.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# success
-../examples/test4 --help > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test43.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test4 --help
diff --git a/tests/test44.sh b/tests/test44.sh
index c379124..7c30ae9 100755
--- a/tests/test44.sh
+++ b/tests/test44.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# success
-../examples/test5 --help > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test44.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test5 --help
diff --git a/tests/test45.sh b/tests/test45.sh
index 69cdbdd..369007c 100755
--- a/tests/test45.sh
+++ b/tests/test45.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# success
-../examples/test6 --help > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test45.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test6 --help
diff --git a/tests/test46.sh b/tests/test46.sh
index cf033ac..ee33671 100755
--- a/tests/test46.sh
+++ b/tests/test46.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# success
-../examples/test7 --help > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test46.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test7 --help
diff --git a/tests/test47.sh b/tests/test47.sh
index 4bfdddc..14c4df4 100755
--- a/tests/test47.sh
+++ b/tests/test47.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# success
-../examples/test8 -s=bill -i=9 -i=8 -B homer marge bart > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test47.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test8 -s=bill -i=9 -i=8 -B homer marge bart
diff --git a/tests/test48.sh b/tests/test48.sh
index 2efa2e2..0482e7b 100755
--- a/tests/test48.sh
+++ b/tests/test48.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# success
-../examples/test8 -s=aaa homer marge bart -- one two > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test48.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test8 -s=aaa homer marge bart -- one two
diff --git a/tests/test49.sh b/tests/test49.sh
index bc07694..1240d99 100755
--- a/tests/test49.sh
+++ b/tests/test49.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# failure
-../examples/test8 -s bbb homer marge bart -- -hv two > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test49.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test8 -s bbb homer marge bart -- -hv two
diff --git a/tests/test5.sh b/tests/test5.sh
index 7c3618e..f0570e8 100755
--- a/tests/test5.sh
+++ b/tests/test5.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# success
-../examples/test2 -i 10 -s homer marge bart lisa > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test5.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test2 -i 10 -s homer marge bart lisa
diff --git a/tests/test50.sh b/tests/test50.sh
index 7c027ad..fa3365b 100755
--- a/tests/test50.sh
+++ b/tests/test50.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# failure
-../examples/test8 -s one homer -B -Bh > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test50.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test8 -s one homer -B -Bh
diff --git a/tests/test51.sh b/tests/test51.sh
index b7921dc..7cb43a6 100755
--- a/tests/test51.sh
+++ b/tests/test51.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# failure
-../examples/test8 -s=one homer -B > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test51.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test8 -s=one homer -B
diff --git a/tests/test52.sh b/tests/test52.sh
index 85a28f7..b26bcff 100755
--- a/tests/test52.sh
+++ b/tests/test52.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# failure
-../examples/test8 -i=9a -i=1 -s=asdf asdf asdf > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test52.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test8 -i=9a -i=1 -s=asdf asdf asdf
diff --git a/tests/test53.sh b/tests/test53.sh
index 0e1ef42..ba26b9e 100755
--- a/tests/test53.sh
+++ b/tests/test53.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# failure
-../examples/test8 -f=9 -f=1.0.0 -s=asdf asdf asdf > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test53.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test8 -f=9 -f=1.0.0 -s=asdf asdf asdf
diff --git a/tests/test54.sh b/tests/test54.sh
index d38ecca..f2f5439 100755
--- a/tests/test54.sh
+++ b/tests/test54.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# success
-../examples/test8 --help > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test54.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test8 --help
diff --git a/tests/test55.sh b/tests/test55.sh
index c0526d5..87d417b 100755
--- a/tests/test55.sh
+++ b/tests/test55.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# success
-../examples/test3 --stringTest=asdf - asdf zero one > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test55.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test3 --stringTest=asdf - asdf zero one
diff --git a/tests/test56.sh b/tests/test56.sh
index 8a06a83..2d4f2fa 100755
--- a/tests/test56.sh
+++ b/tests/test56.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# success
-../examples/test2 -i 1 - -s fdsa one two > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test56.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test2 -i 1 - -s fdsa one two
diff --git a/tests/test57.sh b/tests/test57.sh
index 5256b8f..47a1d99 100755
--- a/tests/test57.sh
+++ b/tests/test57.sh
@@ -1,13 +1,5 @@
#!/bin/sh
-
# failure
# This used to fail on the "Too many arguments!" but now fails sooner,
# and on a more approriate error.
-../examples/test5 --aaa asdf -c fdas --fff blah -i one -i two -j huh > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test57.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test5 --aaa asdf -c fdas --fff blah -i one -i two -j huh
diff --git a/tests/test58.sh b/tests/test58.sh
index 6294fd5..06fab72 100755
--- a/tests/test58.sh
+++ b/tests/test58.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# success
-../examples/test9 > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test58.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test9
diff --git a/tests/test59.sh b/tests/test59.sh
index c2a04bd..16dd28f 100755
--- a/tests/test59.sh
+++ b/tests/test59.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# success
-../examples/test9 -VVV -N --noise -r blah > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test59.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test9 -VVV -N --noise -r blah
diff --git a/tests/test6.sh b/tests/test6.sh
index 9e7f8b7..f6211c3 100755
--- a/tests/test6.sh
+++ b/tests/test6.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# success
-../examples/test2 -i 10 -s hello goodbye -ABC > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test6.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test2 -i 10 -s hello goodbye -ABC
diff --git a/tests/test60.sh b/tests/test60.sh
index d73e0d3..364fbbf 100755
--- a/tests/test60.sh
+++ b/tests/test60.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# failure
-../examples/test9 -VVV -N --noise -rr > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test60.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test9 -VVV -N --noise -rr
diff --git a/tests/test61.sh b/tests/test61.sh
index a402880..1c2b5f7 100755
--- a/tests/test61.sh
+++ b/tests/test61.sh
@@ -1,12 +1,4 @@
#!/bin/sh
-
# this tests a bug in handling of - chars in Unlabeled args
# success
-../examples/test2 -i 10 -s hello "-1 -1" > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test61.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test2 -i 10 -s hello "-1 -1"
diff --git a/tests/test62.sh b/tests/test62.sh
index 9b365e3..9f3ecd4 100755
--- a/tests/test62.sh
+++ b/tests/test62.sh
@@ -1,13 +1,5 @@
#!/bin/sh
-
# this tests whether all required args are listed as
# missing when no arguments are specified
# failure
-../examples/test2 > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test62.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test2
diff --git a/tests/test63.sh b/tests/test63.sh
index 69947d3..3ee284c 100755
--- a/tests/test63.sh
+++ b/tests/test63.sh
@@ -1,13 +1,5 @@
#!/bin/sh
-
# this tests whether all required args are listed as
# missing when no arguments are specified
# failure
-../examples/test11 > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test63.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test11
diff --git a/tests/test64.sh b/tests/test64.sh
index 0090f81..f79a098 100755
--- a/tests/test64.sh
+++ b/tests/test64.sh
@@ -1,13 +1,5 @@
#!/bin/sh
-
# this tests whether all required args are listed as
# missing when no arguments are specified
# failure
-../examples/test11 -v "1 2 3" > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test64.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test11 -v "1 2 3"
diff --git a/tests/test65.sh b/tests/test65.sh
index 1b737c7..4893196 100755
--- a/tests/test65.sh
+++ b/tests/test65.sh
@@ -1,14 +1,5 @@
#!/bin/sh
-
# this tests whether all required args are listed as
# missing when no arguments are specified
-# failure
-../examples/test12 -v "1 2 3" -v "4 5 6" -v "7 8 9" -v "-1 0.2 0.4" \
- > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test65.out; then
- exit 0
-else
- exit 1
-fi
-
+# failure
+./simple-test.sh `basename $0 .sh` test12 -v "1 2 3" -v "4 5 6" -v "7 8 9" -v "-1 0.2 0.4"
diff --git a/tests/test66.sh b/tests/test66.sh
index 99ca94e..50fcb0e 100755
--- a/tests/test66.sh
+++ b/tests/test66.sh
@@ -1,13 +1,5 @@
#!/bin/sh
-
# this tests whether all required args are listed as
# missing when no arguments are specified
# failure
-../examples/test12 > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test66.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test12
diff --git a/tests/test67.sh b/tests/test67.sh
index 72bf285..abb364e 100755
--- a/tests/test67.sh
+++ b/tests/test67.sh
@@ -1,13 +1,5 @@
#!/bin/sh
-
# this tests whether all required args are listed as
# missing when no arguments are specified
# failure
-../examples/test12 -v "a 1 0.3" > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test67.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test12 -v "a 1 0.3"
diff --git a/tests/test68.sh b/tests/test68.sh
index c8f19d7..4350c51 100755
--- a/tests/test68.sh
+++ b/tests/test68.sh
@@ -1,15 +1,7 @@
#!/bin/sh
-
# this tests whether we can parse args from
# a vector of strings and that combined switch
# handling doesn't get fooled if the delimiter
# is in the string
# success
-../examples/test13 > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test68.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test13
diff --git a/tests/test69.sh b/tests/test69.sh
index 843b9ce..29a7df6 100755
--- a/tests/test69.sh
+++ b/tests/test69.sh
@@ -1,12 +1,4 @@
#!/bin/sh
-
# Checks that parsing exceptions are properly
# propagated to the caller.
-../examples/test18 --bob > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test69.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test18 --bob
diff --git a/tests/test7.sh b/tests/test7.sh
index 4f92d8d..4359080 100755
--- a/tests/test7.sh
+++ b/tests/test7.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# success
-../examples/test2 -i 10 -s hello goodbye -hABC > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test7.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test2 -i 10 -s hello goodbye -hABC
diff --git a/tests/test70.sh b/tests/test70.sh
index 596d404..1f40bc8 100755
--- a/tests/test70.sh
+++ b/tests/test70.sh
@@ -1,12 +1,4 @@
#!/bin/sh
-
# Checks that parsing exceptions are properly
# propagated to the caller.
-../examples/test18 --help > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test70.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test18 --help
diff --git a/tests/test71.sh b/tests/test71.sh
index 0e418d5..27ea038 100755
--- a/tests/test71.sh
+++ b/tests/test71.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# success test hex
-../examples/test19 -i 0xA > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test71.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test19 -i 0xA
diff --git a/tests/test72.sh b/tests/test72.sh
index d62b74a..842e4c7 100755
--- a/tests/test72.sh
+++ b/tests/test72.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# success test octal
-../examples/test19 -i 012 > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test72.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test19 -i 012
diff --git a/tests/test73.sh b/tests/test73.sh
index 8556ca4..ebc3e5a 100755
--- a/tests/test73.sh
+++ b/tests/test73.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# success tests whether * in UnlabeledValueArg passes
-../examples/test2 -i 1 -s asdf fff*fff > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test73.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test2 -i 1 -s asdf fff*fff
diff --git a/tests/test74.sh b/tests/test74.sh
index fff59e9..9024f4d 100755
--- a/tests/test74.sh
+++ b/tests/test74.sh
@@ -1,12 +1,4 @@
#!/bin/sh
-
# failure validates that the correct error message
# is displayed for XOR'd args
-../examples/test20 -a -b > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test74.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test20 -a -b
diff --git a/tests/test75.sh b/tests/test75.sh
index 99bba2c..8af013a 100755
--- a/tests/test75.sh
+++ b/tests/test75.sh
@@ -1,12 +1,4 @@
#!/bin/sh
-
# failure validates that the correct error message
# is displayed for XOR'd args
-../examples/test20 -b -a > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test75.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test20 -b -a
diff --git a/tests/test76.sh b/tests/test76.sh
index 3f5f854..9205a5e 100755
--- a/tests/test76.sh
+++ b/tests/test76.sh
@@ -1,12 +1,4 @@
#!/bin/sh
-
# failure validates that the correct error message
# is displayed for XOR'd args
-../examples/test20 -ba > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test76.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test20 -ba
diff --git a/tests/test77.sh b/tests/test77.sh
index 745d93b..6177344 100755
--- a/tests/test77.sh
+++ b/tests/test77.sh
@@ -1,12 +1,4 @@
#!/bin/sh
-
# failure validates that the correct error message
# is displayed for XOR'd args
-../examples/test20 -ab > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test77.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test20 -ab
diff --git a/tests/test78.sh b/tests/test78.sh
index b02ff4d..1164b58 100755
--- a/tests/test78.sh
+++ b/tests/test78.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# success
-../examples/test21 ~~reverse /n mike > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test78.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test21 ~~reverse /n mike
diff --git a/tests/test79.sh b/tests/test79.sh
index 62f5c02..eddc48c 100755
--- a/tests/test79.sh
+++ b/tests/test79.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# success
-../examples/test21 > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test79.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test21
diff --git a/tests/test8.sh b/tests/test8.sh
index 798f6a3..ba891c2 100755
--- a/tests/test8.sh
+++ b/tests/test8.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# success
-../examples/test2 --version > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test8.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test2 --version
diff --git a/tests/test9.sh b/tests/test9.sh
index e3b1bf4..49a89e6 100755
--- a/tests/test9.sh
+++ b/tests/test9.sh
@@ -1,11 +1,3 @@
#!/bin/sh
-
# success
-../examples/test2 -i 10 -s hello goodbye -- -hv one two > tmp.out 2>&1
-
-if cmp -s tmp.out $srcdir/test9.out; then
- exit 0
-else
- exit 1
-fi
-
+./simple-test.sh `basename $0 .sh` test2 -i 10 -s hello goodbye -- -hv one two
From a219293c874b275d7bd3dedd732005288d6054ae Mon Sep 17 00:00:00 2001
From: Daniel Aarno
Date: Mon, 30 Jul 2018 19:48:58 +0100
Subject: [PATCH 11/12] Rename configure.in configure.ac (as this is
recomended)
---
configure.in => configure.ac | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename configure.in => configure.ac (100%)
diff --git a/configure.in b/configure.ac
similarity index 100%
rename from configure.in
rename to configure.ac
From 38af929982194a7cc21d9170f81f3dd6e06e9907 Mon Sep 17 00:00:00 2001
From: Daniel Aarno
Date: Mon, 30 Jul 2018 19:51:18 +0100
Subject: [PATCH 12/12] Correctly name variable for caching (fixes warning by
autotools.sh)
---
config/ac_cxx_warn_effective_cxx.m4 | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/config/ac_cxx_warn_effective_cxx.m4 b/config/ac_cxx_warn_effective_cxx.m4
index 317ad1d..8085d24 100644
--- a/config/ac_cxx_warn_effective_cxx.m4
+++ b/config/ac_cxx_warn_effective_cxx.m4
@@ -10,19 +10,19 @@ AC_DEFUN([HAVE_WARN_EFFECTIVE_CXX],
[
AC_REQUIRE([AC_PROG_CXX])
AC_MSG_CHECKING([whether the C++ compiler (${CXX}) accepts -Weffc++])
-AC_CACHE_VAL([cv_warn_effective_cxx],
+AC_CACHE_VAL([_cv_warn_effective_cxx],
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
save_cxxflags="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -Weffc++"
AC_TRY_COMPILE([],[main();],
-[cv_warn_effective_cxx=yes], [cv_warn_effective_cxx=no])
+[_cv_warn_effective_cxx=yes], [_cv_warn_effective_cxx=no])
CXXFLAGS="$save_cxxflags"
AC_LANG_RESTORE
])
-AC_MSG_RESULT([$cv_warn_effective_cxx])
-if test "$cv_warn_effective_cxx" = yes; then
+AC_MSG_RESULT([$_cv_warn_effective_cxx])
+if test "$_cv_warn_effective_cxx" = yes; then
WARN_EFFECTIVE_CXX=-Weffc++
WARN_NO_EFFECTIVE_CXX=-Wno-effc++
fi