aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-01-16 15:32:00 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-01-16 15:32:00 +0200
commit47751abc43dab40e0ac4a1523994fd533e6a3b22 (patch)
treebb61a346538ddb6945e8aff4c3919ce002c55a89 /tests
parentc106259517d7693ea8e24564bc890fe575d5edcd (diff)
Add support for directory prefixes
For example: cxx{driver ../{foo bar}} cxx{driver} ../cxx{foo bar}
Diffstat (limited to 'tests')
-rw-r--r--tests/build/parser/buildfile2
-rw-r--r--tests/build/parser/driver.cxx6
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/build/parser/buildfile b/tests/build/parser/buildfile
new file mode 100644
index 0000000..2672a02
--- /dev/null
+++ b/tests/build/parser/buildfile
@@ -0,0 +1,2 @@
+exe{driver}: cxx{driver ../../../build/{lexer parser scope target native \
+ prerequisite context diagnostics trace utility path timestamp}}
diff --git a/tests/build/parser/driver.cxx b/tests/build/parser/driver.cxx
index a8c8fc9..8e4a60b 100644
--- a/tests/build/parser/driver.cxx
+++ b/tests/build/parser/driver.cxx
@@ -54,6 +54,12 @@ main ()
assert (!parse ("foo: bar:"));
assert (!parse ("exe{foo:"));
+ // Directory prefix.
+ //
+ assert (parse ("../{foo}: ../{bar}"));
+ assert (parse ("../exe{foo}: ../obj{bar}"));
+ assert (!parse ("../exe{exe{foo}}:"));
+
// Directory scope.
//
assert (parse ("test/:\n{\n}"));