aboutsummaryrefslogtreecommitdiff
path: root/tests/build/parser
diff options
context:
space:
mode:
Diffstat (limited to 'tests/build/parser')
-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}"));