aboutsummaryrefslogtreecommitdiff
path: root/testdata/local
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2023-10-22 01:06:38 +0700
committerShulhan <ms@kilabit.info>2023-10-22 01:32:42 +0700
commitfc7cd444e7d637c291a3f9ba9987ba0335af4809 (patch)
treef1a32b5081417a1d64fe2cf88345ecf4494d3f97 /testdata/local
parent4411ca1953c95ddc013e47c55e87303b7290e2cc (diff)
downloadawwan-fc7cd444e7d637c291a3f9ba9987ba0335af4809.tar.xz
all: add magic command "#local"
The magic command "#local" define the command to be executed using shell in local environment. Its have effect and can only be used in script that executed using "play". In script that is executed using "local" it does nothing.
Diffstat (limited to 'testdata/local')
-rw-r--r--testdata/local/local.aww6
-rw-r--r--testdata/local/local_test.data13
2 files changed, 19 insertions, 0 deletions
diff --git a/testdata/local/local.aww b/testdata/local/local.aww
new file mode 100644
index 0000000..3ee69f4
--- /dev/null
+++ b/testdata/local/local.aww
@@ -0,0 +1,6 @@
+echo "hello"
+
+## Should do nothing.
+#local: echo "nothing"
+
+echo "local"
diff --git a/testdata/local/local_test.data b/testdata/local/local_test.data
new file mode 100644
index 0000000..1901f11
--- /dev/null
+++ b/testdata/local/local_test.data
@@ -0,0 +1,13 @@
+Test on "local" command.
+
+<<< local:stdout
+
+--> local: 1: echo "hello"
+hello
+
+--> local: 4: #local: echo "nothing"
+
+--> local: 6: echo "local"
+local
+
+<<< local:stderr