2020-02-07 21:10:55 +00:00
|
|
|
#RUN: %fish %s
|
2019-02-09 11:34:00 +00:00
|
|
|
# Tests for the "builtin" builtin/keyword.
|
|
|
|
builtin -q string; and echo String exists
|
2020-02-07 21:10:55 +00:00
|
|
|
#CHECK: String exists
|
2019-02-09 11:34:00 +00:00
|
|
|
builtin -q; and echo None exists
|
|
|
|
builtin -q string echo banana; and echo Some of these exist
|
2020-02-07 21:10:55 +00:00
|
|
|
#CHECK: Some of these exist
|
2019-02-09 11:34:00 +00:00
|
|
|
builtin -nq string
|
2020-02-07 21:10:55 +00:00
|
|
|
#CHECKERR: builtin: Invalid combination of options,
|
|
|
|
#CHECKERR: --query and --names are mutually exclusive
|
2019-02-09 11:34:00 +00:00
|
|
|
echo $status
|
2020-02-07 21:10:55 +00:00
|
|
|
#CHECK: 2
|
2019-02-09 11:34:00 +00:00
|
|
|
exit 0
|