summaryrefslogtreecommitdiff
path: root/.config/shells/zsh/plugins/fzf-tab/modules/Test/B05eval.ztst
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@simplelittledream.com>2022-07-14 19:09:06 -0400
committerJacob McDonnell <jacob@simplelittledream.com>2022-07-14 19:09:06 -0400
commited4daf7429bf2580118aad87b8f3e2011efed7ec (patch)
tree82f9d8ed68de119e5777f5ecfae9df4a92fe92b3 /.config/shells/zsh/plugins/fzf-tab/modules/Test/B05eval.ztst
Initial commit
Diffstat (limited to '.config/shells/zsh/plugins/fzf-tab/modules/Test/B05eval.ztst')
-rw-r--r--.config/shells/zsh/plugins/fzf-tab/modules/Test/B05eval.ztst34
1 files changed, 34 insertions, 0 deletions
diff --git a/.config/shells/zsh/plugins/fzf-tab/modules/Test/B05eval.ztst b/.config/shells/zsh/plugins/fzf-tab/modules/Test/B05eval.ztst
new file mode 100644
index 0000000..6427d6f
--- /dev/null
+++ b/.config/shells/zsh/plugins/fzf-tab/modules/Test/B05eval.ztst
@@ -0,0 +1,34 @@
+# Tests for the eval builtin.
+# This is quite short; eval is widely tested throughout the test suite
+# and its basic behaviour is fairly straightforward.
+
+%prep
+
+ cmd='print $?'
+
+%test
+
+ false
+ eval $cmd
+0:eval retains value of $?
+>1
+
+ # no point getting worked up over what the error message is...
+ ./command_not_found 2>/dev/null
+ eval $cmd
+0:eval after command not found
+>127
+
+ # trick the test system
+ sp=
+ false
+ eval "
+ $sp
+ $sp
+ $sp
+ "
+0:eval with empty command resets the status
+
+ false
+ eval
+0:eval with empty command resets the status