diff options
Diffstat (limited to 'tests/names')
-rw-r--r-- | tests/names/buildfile | 54 | ||||
-rw-r--r-- | tests/names/test.out | 37 | ||||
-rwxr-xr-x | tests/names/test.sh | 3 |
3 files changed, 94 insertions, 0 deletions
diff --git a/tests/names/buildfile b/tests/names/buildfile new file mode 100644 index 0000000..0f3d482 --- /dev/null +++ b/tests/names/buildfile @@ -0,0 +1,54 @@ +# Name separation. +# +print foo {bar baz} +print fox/ {bar baz} +print fox/foo {bar baz} + +# Name "crosses". +# +print {}{bar} # Same as bar. +print {foo}{} # Same as foo{} (empty name of type foo). +print foo{} # For compatiron. +print {foo}{bar} +print {foo}{bar baz} +print {foo fox}{bar} +print {foo fox}{bar baz} + +print dir/{}{bar} # Same as dir/bar. +print dir/{foo}{} # Same as dir/foo{} (directory of type foo). +print dir/foo{} # For comparison. +print dir/{foo}{bar} +print dir/{foo}{bar baz} +print dir/{foo fox}{bar} +print dir/{foo fox}{bar baz} + +print {dir/}{bar} +print {dir/}{bar baz} +print {dir/ dor/}{bar} +print {dir/ dor/}{bar baz} + +print {dir/foo}{bar} +print {dir/foo}{bar baz} +print {dir/foo dor/fox}{bar} +print {dir/foo dor/fox}{bar baz} + +print {dir/}{foo}{bar} +print {dir/}{foo}{bar baz} +print {dir/ dor/}{foo}{bar} +print {dir/ dor/}{foo fox}{bar baz} + +print {prj%foo}{bar baz} +print {foo}{bar prj%baz} +#print {prj%foo}{bar prk%baz} # nested project name + +print dir/{foo}{bar baz} +print {foo}{bar dir/{baz}} +print dir/{foo}{bar dor/{baz}} + +print {dir/foo{}}{bar} +print {dir/{foo}}{bar} +print {dir/}{foo{bar}} +#print {dir/foo{fox}}{bar} # nested type name +#print {dir/foo}{fox{bar}} # nested type name + +./: diff --git a/tests/names/test.out b/tests/names/test.out new file mode 100644 index 0000000..280c372 --- /dev/null +++ b/tests/names/test.out @@ -0,0 +1,37 @@ +foo bar baz +fox/ bar baz +fox/foo bar baz +bar +foo{} +foo{} +foo{bar} +foo{bar} foo{baz} +foo{bar} fox{bar} +foo{bar} fox{bar} foo{baz} fox{baz} +dir/bar +foo{dir/} +foo{dir/} +dir/foo{bar} +dir/foo{bar} dir/foo{baz} +dir/foo{bar} dir/fox{bar} +dir/foo{bar} dir/fox{bar} dir/foo{baz} dir/fox{baz} +dir/bar +dir/bar dir/baz +dir/bar dor/bar +dir/bar dor/bar dir/baz dor/baz +dir/foo{bar} +dir/foo{bar} dir/foo{baz} +dir/foo{bar} dor/fox{bar} +dir/foo{bar} dor/fox{bar} dir/foo{baz} dor/fox{baz} +dir/foo{bar} +dir/foo{bar} dir/foo{baz} +dir/foo{bar} dor/foo{bar} +dir/foo{bar} dor/foo{bar} dir/fox{bar} dor/fox{bar} dir/foo{baz} dor/foo{baz} dir/fox{baz} dor/fox{baz} +prj%foo{bar} prj%foo{baz} +foo{bar} prj%foo{baz} +dir/foo{bar} dir/foo{baz} +foo{bar} dir/foo{baz} +dir/foo{bar} dir/dor/foo{baz} +dir/foo{bar} +dir/foo{bar} +dir/foo{bar} diff --git a/tests/names/test.sh b/tests/names/test.sh new file mode 100755 index 0000000..b898b3c --- /dev/null +++ b/tests/names/test.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +valgrind -q b -q | diff -u test.out - |