diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-07-28 07:17:29 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-07-28 13:53:22 +0200 |
commit | b11aaa16d404ce7dc55de6b7338dccbf053a72bd (patch) | |
tree | be5a63a170f9de7318e91d79c4784badb8a4488f /tests/variable/dir-path/buildfile | |
parent | ad7d4bd0722aa70ba634900cebf93a1b1814fed9 (diff) |
Adjust to new path implementation, use to support reversibility
Diffstat (limited to 'tests/variable/dir-path/buildfile')
-rw-r--r-- | tests/variable/dir-path/buildfile | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/tests/variable/dir-path/buildfile b/tests/variable/dir-path/buildfile new file mode 100644 index 0000000..5c99f07 --- /dev/null +++ b/tests/variable/dir-path/buildfile @@ -0,0 +1,45 @@ +# Untyped dir path reversability. +# +x = s/foo/bar/ +print -e=$x +print -e $x + +y = $x +print -e=$y +print -e $y +print + +# Typed dir path reversability and expansion. +# +x = [dir_path] foo/bar/ +print -I$x +print -I$x/baz +print -I $x +print [strings] -I $x +print -I $x/baz +print + +y = $x # No longer typed but still not original. +print -I$y +print -I$y/baz +print -I $y +print [strings] -I $y +print -I $y/baz +print + +z = [strings] $x # Re-typed. +print $z +print + +# The root case. +# +r = [dir_path] / +print $r/foo + +r += foo +print [strings] $r + +r += bar +print [strings] $r + +./: |