aboutsummaryrefslogtreecommitdiff
path: root/old-tests/variable/type-pattern-append
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-12-01 12:07:18 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-12-01 12:07:18 +0200
commit0ed86c76239d4f2904ea4ae1a77902a9e0db2a6d (patch)
tree5e8e1d43a0140f5739b21be7cbe120ebb9360d4f /old-tests/variable/type-pattern-append
parent12fc75188cc1f0a8c4c443c04e7a022131198c36 (diff)
Move old tests to old-tests/
Diffstat (limited to 'old-tests/variable/type-pattern-append')
-rw-r--r--old-tests/variable/type-pattern-append/buildfile59
-rw-r--r--old-tests/variable/type-pattern-append/test.out7
-rwxr-xr-xold-tests/variable/type-pattern-append/test.sh3
3 files changed, 69 insertions, 0 deletions
diff --git a/old-tests/variable/type-pattern-append/buildfile b/old-tests/variable/type-pattern-append/buildfile
new file mode 100644
index 0000000..a91b340
--- /dev/null
+++ b/old-tests/variable/type-pattern-append/buildfile
@@ -0,0 +1,59 @@
+# Typed append/prepend.
+#
+#dir{a*}: x += [bool] true
+#dir{p*}: x =+ [bool] true
+
+[string] typed = [null]
+dir{a*}: typed += abc # ok
+dir{p*}: typed =+ abc # ok
+
+# Prepend/append before/after assignment.
+#
+[string] x1 = [null]
+dir{*}: x1 += A
+dir{*}: x1 = b
+dir{*}: x1 += c
+dir{*}: x1 =+ a
+print $(dir{./}:x1)
+
+# Without stem, mixed prepend/append.
+#
+dir{*}: x2 += b
+dir{*}: x2 += c
+#dir{*}: x2 =+ a # error
+print $(dir{./}:x2)
+
+dir{*}: x3 =+ b
+dir{*}: x3 =+ a
+#dir{*}: x3 += c # error
+print $(dir{./}:x3)
+
+# With stem, typing.
+#
+x4 = a
+dir{*}: x4 += b
+dir{*}: x4 += c
+print $(dir{./}:x4)
+
+[string] x5 = b
+dir{*}: x5 =+ a
+x = $(dir{./}:x5)
+print $(dir{./}:x5)
+
+x6 = [string] a
+sub/:
+{
+ dir{*}: x6 += b
+ dir{*}: x6 += [null]
+ print $(dir{./}:x6)
+}
+
+x7 = [string] b
+dir{*}: x7 =+ a
+sub/:
+{
+ dir{*}: x7 += c
+ print $(dir{./}:x7)
+}
+
+./:
diff --git a/old-tests/variable/type-pattern-append/test.out b/old-tests/variable/type-pattern-append/test.out
new file mode 100644
index 0000000..e8e2242
--- /dev/null
+++ b/old-tests/variable/type-pattern-append/test.out
@@ -0,0 +1,7 @@
+abc
+b c
+a b
+a b c
+ab
+ab
+abc
diff --git a/old-tests/variable/type-pattern-append/test.sh b/old-tests/variable/type-pattern-append/test.sh
new file mode 100755
index 0000000..c745b76
--- /dev/null
+++ b/old-tests/variable/type-pattern-append/test.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+b -q | diff --strip-trailing-cr -u test.out -