aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-10-16 07:55:02 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-10-16 07:55:02 +0200
commitb82298fbb340446303c9510b56d41cead9d0755b (patch)
treed45f65b4b6d87d2e1207f0127f0331eb4278149f /tests
parent519ae8a0cd36c9726c12df8df864f9b6853d9857 (diff)
Escape quoting in config.{c,cxx} paths when passing to tests
This is needed due to the command line re-parsing (see "Lexical Structure" in the Testscript manual for details).
Diffstat (limited to 'tests')
-rw-r--r--tests/ci.testscript2
-rw-r--r--tests/common.testscript3
-rw-r--r--tests/config.testscript2
-rw-r--r--tests/fetch.testscript2
-rw-r--r--tests/init.testscript2
-rw-r--r--tests/new.testscript4
-rw-r--r--tests/publish.testscript2
-rw-r--r--tests/status.testscript2
-rw-r--r--tests/sync.testscript2
-rw-r--r--tests/test.testscript2
-rw-r--r--tests/update.testscript2
11 files changed, 13 insertions, 12 deletions
diff --git a/tests/ci.testscript b/tests/ci.testscript
index b56b4eb..6fa73eb 100644
--- a/tests/ci.testscript
+++ b/tests/ci.testscript
@@ -52,7 +52,7 @@ repository='http://example.com/prj.git'
test.arguments += --yes --repository "$repository" --server "$server" \
--simulate 'success'
-cxx = cc config.cxx="'$recall($cxx.path)'"
+cxx = cc config.cxx="\\'$recall($cxx.path)\\'"
new += 2>!
init += $cxx -d prj 2>! &prj/**/bootstrap/***
diff --git a/tests/common.testscript b/tests/common.testscript
index bee2cee..cf5931d 100644
--- a/tests/common.testscript
+++ b/tests/common.testscript
@@ -17,7 +17,8 @@ build = $recall($build.path)
# Disable loading the user's default options files (that may affect the test
# commands execution) for bdep, bpkg, and build2.
#
-# @@ Quote paths similar to config.cxx (how does it even work on Windows)?
+# Note that this works without quoting on Windows because of the effective
+# escaping during the command line re-parse.
#
options_guard = $~/.build2
+mkdir $options_guard
diff --git a/tests/config.testscript b/tests/config.testscript
index 11ec4ef..dedb552 100644
--- a/tests/config.testscript
+++ b/tests/config.testscript
@@ -7,7 +7,7 @@
.include common.testscript project.testscript
-cxx = cc config.cxx="'$recall($cxx.path)'"
+cxx = cc config.cxx="\\'$recall($cxx.path)\\'"
status += -d prj
init += -d prj
diff --git a/tests/fetch.testscript b/tests/fetch.testscript
index 6e4645b..0aa7f1d 100644
--- a/tests/fetch.testscript
+++ b/tests/fetch.testscript
@@ -4,7 +4,7 @@
.include common.testscript project.testscript
-cxx = cc config.cxx="'$recall($cxx.path)'"
+cxx = cc config.cxx="\\'$recall($cxx.path)\\'"
new += 2>!
init += $cxx -d prj 2>!
diff --git a/tests/init.testscript b/tests/init.testscript
index ccc1775..3fb23a8 100644
--- a/tests/init.testscript
+++ b/tests/init.testscript
@@ -7,7 +7,7 @@
.include common.testscript project.testscript
-cxx = cc config.cxx="'$recall($cxx.path)'"
+cxx = cc config.cxx="\\'$recall($cxx.path)\\'"
status += -d prj
deinit += -d prj
diff --git a/tests/new.testscript b/tests/new.testscript
index 3692e54..f5b105c 100644
--- a/tests/new.testscript
+++ b/tests/new.testscript
@@ -14,8 +14,8 @@ c_tests = ($c.target.class != 'windows' && $c.target.class != 'macos')
#
test.arguments += --no-checks
-c = config.c="'$recall($c.path)'"
-cxx = config.cxx="'$recall($cxx.path)'"
+c = config.c="\\'$recall($c.path)\\'"
+cxx = config.cxx="\\'$recall($cxx.path)\\'"
status += -d prj
diff --git a/tests/publish.testscript b/tests/publish.testscript
index d10c3fe..b34e8e2 100644
--- a/tests/publish.testscript
+++ b/tests/publish.testscript
@@ -30,7 +30,7 @@ end
test.arguments += --repository "$repository" --yes \
--author-name user --author-email user@example.com
-cxx = cc config.cxx="'$recall($cxx.path)'"
+cxx = cc config.cxx="\\'$recall($cxx.path)\\'"
new += 2>!
init += $cxx -d prj 2>! &prj/**/bootstrap/***
diff --git a/tests/status.testscript b/tests/status.testscript
index 27a6a60..d1b430e 100644
--- a/tests/status.testscript
+++ b/tests/status.testscript
@@ -4,7 +4,7 @@
.include common.testscript project.testscript
-cxx = cc config.cxx="'$recall($cxx.path)'"
+cxx = cc config.cxx="\\'$recall($cxx.path)\\'"
new += 2>!
init += $cxx -d prj 2>!
diff --git a/tests/sync.testscript b/tests/sync.testscript
index c0caab1..666fa86 100644
--- a/tests/sync.testscript
+++ b/tests/sync.testscript
@@ -4,7 +4,7 @@
.include common.testscript
-cxx = cc config.cxx="'$recall($cxx.path)'"
+cxx = cc config.cxx="\\'$recall($cxx.path)\\'"
new += 2>!
init += $cxx -d prj 2>!
diff --git a/tests/test.testscript b/tests/test.testscript
index 9d0191e..0437789 100644
--- a/tests/test.testscript
+++ b/tests/test.testscript
@@ -4,7 +4,7 @@
.include common.testscript
-cxx = cc config.cxx="'$recall($cxx.path)'"
+cxx = cc config.cxx="\\'$recall($cxx.path)\\'"
new += 2>!
init += cc "'config.cxx=$config.cxx'" -d prj 2>!
diff --git a/tests/update.testscript b/tests/update.testscript
index 2701b3b..59442d1 100644
--- a/tests/update.testscript
+++ b/tests/update.testscript
@@ -7,7 +7,7 @@
.include common.testscript
-cxx = cc config.cxx="'$recall($cxx.path)'"
+cxx = cc config.cxx="\\'$recall($cxx.path)\\'"
new += 2>!
init += $cxx -d prj 2>!