aboutsummaryrefslogtreecommitdiff
path: root/tests/manifest
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manifest')
-rw-r--r--tests/manifest/driver.cxx10
-rw-r--r--tests/manifest/testscript106
2 files changed, 107 insertions, 9 deletions
diff --git a/tests/manifest/driver.cxx b/tests/manifest/driver.cxx
index 6ef6193..85097be 100644
--- a/tests/manifest/driver.cxx
+++ b/tests/manifest/driver.cxx
@@ -61,7 +61,7 @@ main (int argc, char* argv[])
{
if (mode == "-p")
{
- bool complete_depends (false);
+ bool complete_dependencies (false);
bool ignore_unknown (false);
for (int i (2); i != argc; ++i)
@@ -69,7 +69,7 @@ main (int argc, char* argv[])
string o (argv[i]);
if (o == "-c")
- complete_depends = true;
+ complete_dependencies = true;
else if (o == "-i")
ignore_unknown = true;
else
@@ -96,7 +96,7 @@ main (int argc, char* argv[])
}
},
ignore_unknown,
- complete_depends).serialize (s);
+ complete_dependencies).serialize (s);
}
else if (mode == "-ec")
{
@@ -109,8 +109,8 @@ main (int argc, char* argv[])
string s;
while (!eof (getline (cin, s)))
{
- dependency_constraint c (s);
- dependency_constraint ec (c.effective (v));
+ version_constraint c (s);
+ version_constraint ec (c.effective (v));
assert (c.complete () == (c == ec));
diff --git a/tests/manifest/testscript b/tests/manifest/testscript
index 2af195d..ee47889 100644
--- a/tests/manifest/testscript
+++ b/tests/manifest/testscript
@@ -499,7 +499,7 @@
EOI
}
- : dependency
+ : depends
:
{
: short-name
@@ -515,7 +515,7 @@
: invalid-version-range
:
- $* -c <<EOI 2>'stdin:6:10: error: invalid dependency constraint: min version is greater than max version' != 0
+ $* -c <<EOI 2>'stdin:6:10: error: invalid prerequisite package constraint: min version is greater than max version' != 0
: 1
name: foo
version: 2.0.0
@@ -586,7 +586,7 @@
license: LGPLv2
depends: bar ~$
EOI
- stdin:6:10: error: invalid dependency constraint: dependent version is not standard
+ stdin:6:10: error: invalid prerequisite package constraint: dependent version is not standard
EOE
: latest-snapshot
@@ -607,7 +607,6 @@
depends: bar == 2.0.0-a.0.123 | libbaz [2.0.0-a.0.1 2.0.0-a.1) | libbox\
[2.0.0-a.0.1 2.0.0-a.1) | libfox [1.0 2.0.0-a.0.123)
EOO
-
}
: incomplete
@@ -621,6 +620,102 @@
depends: bar == $ | libbaz ~$ | libbox ^$ | libfox [1.0 $)
EOF
}
+
+ : tests
+ :
+ {
+ : short-name
+ :
+ $* <<EOI 2>'stdin:6:8: error: invalid tests package name: length is less than two characters' != 0
+ : 1
+ name: foo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ tests: b
+ EOI
+
+ : invalid-version-range-incomplete
+ :
+ $* -c <<EOI 2>'stdin:6:8: error: invalid tests package constraint: min version is greater than max version' != 0
+ : 1
+ name: foo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ tests: bar [$ 1.0.0]
+ EOI
+
+ : invalid-version-range
+ :
+ $* -c <<EOI 2>'stdin:6:8: error: invalid tests package constraint: min version is greater than max version' != 0
+ : 1
+ name: foo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ tests: bar [2.0.0 1.0.0]
+ EOI
+
+ : invalid-version
+ :
+ $* -c <<EOI 2>'stdin:6:8: error: invalid tests package constraint: invalid version: equal version endpoints are earliest' != 0
+ : 1
+ name: foo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ tests: bar == 2.0.0-
+ EOI
+
+ : complete
+ :
+ {
+ test.options += -c
+
+ : final
+ :
+ $* <<EOI >>EOO
+ : 1
+ name: foo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ tests: bar == $
+ EOI
+ : 1
+ name: foo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ tests: bar == 2.0.0
+ EOO
+
+ : non-standard-shortcut
+ :
+ $* <<EOI 2>>EOE != 0
+ : 1
+ name: foo
+ version: 2.0.0-x
+ summary: Modern C++ parser
+ license: LGPLv2
+ tests: bar ~$
+ EOI
+ stdin:6:8: error: invalid tests package constraint: dependent version is not standard
+ EOE
+ }
+
+ : incomplete
+ :
+ $* <<EOF >>EOF
+ : 1
+ name: foo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ tests: bar == $
+ EOF
+ }
}
: package-list
@@ -670,6 +765,9 @@
requires: ? ; libc++ standard library if using Clang on Mac OS X.
requires: zlib; Most Linux/UNIX systems already have one; or get it at\
www.zlib.net.
+ tests: libfoo-tests
+ examples: libfoo-examples == 1.2.3
+ benchmarks: libfoo-benchmarks ~1.2.0
builds: +!windows &( +gcc +clang ) +( +windows &msvc )
build-include: linux*
build-include: freebsd*