aboutsummaryrefslogtreecommitdiff
path: root/tests/command/testscript
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-09-13 13:33:02 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-09-27 17:08:05 +0300
commitc4292d57e2e67dfcdac9004f8edb229976f6669a (patch)
tree0c9be2ed21bbb18dfede60769c9c864c5a2f550d /tests/command/testscript
parent1c6758009e82c47b5b341d418be2be401ef31482 (diff)
Add builtins support to command running API
Diffstat (limited to 'tests/command/testscript')
-rw-r--r--tests/command/testscript32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/command/testscript b/tests/command/testscript
index bffe621..db9bb5c 100644
--- a/tests/command/testscript
+++ b/tests/command/testscript
@@ -153,3 +153,35 @@ end
:
$* "'$0' -C -S 10" 2>/~'%.+ exited with code 10%' == 10
}
+
+: builtin
+:
+{
+ : no-cwd
+ :
+ {
+ $* 'touch a' &a;
+ test -f a
+ }
+
+ : cwd
+ :
+ {
+ mkdir a;
+ $* -d a 'touch b' &a/b;
+ test -f a/b
+ }
+
+ : redirect
+ :
+ {
+ $* 'echo abc >a' &a;
+ cat a >'abc'
+ }
+
+ : callback
+ :
+ {
+ $* -p 'echo abc >a' >'echo abc >a' &a
+ }
+}