aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/build/script/parser+diag.test.testscript
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/build/script/parser+diag.test.testscript')
-rw-r--r--libbuild2/build/script/parser+diag.test.testscript36
1 files changed, 36 insertions, 0 deletions
diff --git a/libbuild2/build/script/parser+diag.test.testscript b/libbuild2/build/script/parser+diag.test.testscript
index 60683bc..5b4e64a 100644
--- a/libbuild2/build/script/parser+diag.test.testscript
+++ b/libbuild2/build/script/parser+diag.test.testscript
@@ -55,3 +55,39 @@ $* <<EOI >>~%EOO%
buildfile:12:1: info: previous call is here
EOE
}
+
+: inside-if
+:
+$* <<EOI 2>>EOE != 0
+ if true
+ diag copy >= $>
+ fi
+ EOI
+ buildfile:12:3: error: 'diag' call inside flow control construct
+ EOE
+
+: inside-if-cond
+:
+$* <<EOI 2>>EOE != 0
+ if diag copy >= $>
+ true
+ fi
+ EOI
+ buildfile:11:4: error: 'diag' call inside flow control construct
+ EOE
+
+: second-command
+:
+$* <<EOI 2>>EOE != 0
+ true && diag copy >= $>
+ EOI
+ buildfile:11:9: error: 'diag' call must be the only command
+ EOE
+
+: via-env
+:
+$* <<EOI 2>>EOE != 0
+ env -- diag copy >= $>
+ EOI
+ buildfile:11:8: error: 'diag' call via 'env' builtin
+ EOE