fish-shell/tests/checks/builtinbuiltin.fish

18 lines
500 B
Fish
Raw Normal View History

#RUN: %fish %s
# Tests for the "builtin" builtin/keyword.
builtin -q string; and echo String exists
2020-02-08 05:10:55 +08:00
#CHECK: String exists
builtin -q; and echo None exists
builtin -q string echo banana; and echo Some of these exist
2020-02-08 05:10:55 +08:00
#CHECK: Some of these exist
builtin -nq string
2021-11-04 13:52:17 +08:00
#CHECKERR: builtin: invalid option combination, --query and --names are mutually exclusive
echo $status
2020-02-08 05:10:55 +08:00
#CHECK: 2
builtin -- -q &| grep -q "builtin - run a builtin command\|fish: builtin: missing man page"
echo $status
#CHECK: 0
exit 0