summaryrefslogtreecommitdiff
path: root/tests/erase
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-04-08 14:51:57 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-04-27 11:38:53 +0300
commit720c5a33b6a49cf328fdd7611f49153cf8f60247 (patch)
tree9725f3d1f42ec90fde84520f49647edea013ce5e /tests/erase
parent3183f3bb927a90783ae0aeaf190a0919377aabe4 (diff)
Separate tests and examples into individual packages
Also make cli module to be explicitly enabled via the config.cli configuration variable.
Diffstat (limited to 'tests/erase')
-rw-r--r--tests/erase/buildfile10
-rw-r--r--tests/erase/driver.cxx34
-rw-r--r--tests/erase/test.cli9
3 files changed, 0 insertions, 53 deletions
diff --git a/tests/erase/buildfile b/tests/erase/buildfile
deleted file mode 100644
index 7b2ebbd..0000000
--- a/tests/erase/buildfile
+++ /dev/null
@@ -1,10 +0,0 @@
-# file : tests/erase/buildfile
-# license : MIT; see accompanying LICENSE file
-
-exe{driver}: {hxx cxx}{* -test} cli.cxx{test}
-exe{driver}: test.arguments = foo -a bar -b 123 --arg -- -b 234
-
-cxx.poptions =+ "-I$out_base"
-
-cli.cxx{test}: cli{test}
-cli.options = --no-combined-flags # Can't be used with the skip unknown mode.
diff --git a/tests/erase/driver.cxx b/tests/erase/driver.cxx
deleted file mode 100644
index e2207ef..0000000
--- a/tests/erase/driver.cxx
+++ /dev/null
@@ -1,34 +0,0 @@
-// file : tests/erase/driver.cxx
-// author : Boris Kolpackov <boris@codesynthesis.com>
-// license : MIT; see accompanying LICENSE file
-
-// Test argument erasing.
-//
-
-#include <string>
-#include <cassert>
-
-#include "test.hxx"
-
-using namespace std;
-
-int
-main (int argc, char* argv[])
-{
- options o (argc, argv, true,
- cli::unknown_mode::skip,
- cli::unknown_mode::skip);
-
- assert (o.a ());
- assert (o.b () == 123);
-
- // We should have 'foo bar --arg -- -b 234'.
- //
- assert (argc == 7);
- assert (argv[1] == string ("foo"));
- assert (argv[2] == string ("bar"));
- assert (argv[3] == string ("--arg"));
- assert (argv[4] == string ("--"));
- assert (argv[5] == string ("-b"));
- assert (argv[6] == string ("234"));
-}
diff --git a/tests/erase/test.cli b/tests/erase/test.cli
deleted file mode 100644
index 7c14b69..0000000
--- a/tests/erase/test.cli
+++ /dev/null
@@ -1,9 +0,0 @@
-// file : tests/erase/test.cli
-// author : Boris Kolpackov <boris@codesynthesis.com>
-// license : MIT; see accompanying LICENSE file
-
-class options
-{
- bool -a;
- int -b;
-};