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