fish-shell/tests
Kurtis Rader 51468b7646 add function --shadow-builtin flag
It's currently too easy for someone to bork their shell by doing something
like `function test; return 0; end`. That's obviously a silly, contrived,
example but the point is that novice users who learn about functions are
prone to do something like that without realizing it will bork the shell. Even
expert users who know about the `test` builtin might forget that, say, `pwd`
is a builtin.

This change adds a `--shadow-builtin` flag that must be specified to
indicate you know what you're doing.

Fixes #3000
2016-05-14 20:38:32 -07:00
..
test_functions Define a common mktemp for tests 2014-11-24 01:51:07 -08:00
abbr.err Add abbreviation tests 2015-06-14 14:13:57 -07:00
abbr.in abbr: Ensure we don't split on "=" if the given separator is " " 2016-01-14 16:58:29 +01:00
abbr.out abbr tests: Don't expect quoted "--*" 2016-01-14 16:58:29 +01:00
abbr.status Add abbreviation tests 2015-06-14 14:13:57 -07:00
bind.expect fix bind unit tests 2016-04-28 21:12:58 -07:00
bind.expect.err Reset fish_bind_mode when changing fish_key_bindings 2014-09-18 15:46:17 -07:00
bind.expect.out fix flakey test 2016-02-16 11:40:40 -08:00
bind.expect.status Reset fish_bind_mode when changing fish_key_bindings 2014-09-18 15:46:17 -07:00
c-locale.err fix handling of non-ASCII chars in C locale 2016-03-20 18:47:38 -07:00
c-locale.in fix handling of non-ASCII chars in C locale 2016-03-20 18:47:38 -07:00
c-locale.out fix handling of non-ASCII chars in C locale 2016-03-20 18:47:38 -07:00
c-locale.status fix handling of non-ASCII chars in C locale 2016-03-20 18:47:38 -07:00
commandline.expect Stop unescaping strings with commandline -b 2016-01-10 17:25:22 -08:00
commandline.expect.err Stop unescaping strings with commandline -b 2016-01-10 17:25:22 -08:00
commandline.expect.out Stop unescaping strings with commandline -b 2016-01-10 17:25:22 -08:00
commandline.expect.status Stop unescaping strings with commandline -b 2016-01-10 17:25:22 -08:00
expansion.err Pass the character index, not the character, to parse_util_expand_variable_error 2015-05-15 17:56:12 -07:00
expansion.in make testing on local servers hermetic 2016-02-25 17:16:36 -08:00
expansion.out Pass the character index, not the character, to parse_util_expand_variable_error 2015-05-15 17:56:12 -07:00
expansion.status Fix double expansions ($$foo) 2014-08-20 21:45:07 -07:00
fish_realpath.err provide a realpath implementation 2016-04-28 16:03:27 -07:00
fish_realpath.in provide a realpath implementation 2016-04-28 16:03:27 -07:00
fish_realpath.out provide a realpath implementation 2016-04-28 16:03:27 -07:00
fish_realpath.status provide a realpath implementation 2016-04-28 16:03:27 -07:00
function.err add function --shadow-builtin flag 2016-05-14 20:38:32 -07:00
function.in add function --shadow-builtin flag 2016-05-14 20:38:32 -07:00
function.out add function --shadow-builtin flag 2016-05-14 20:38:32 -07:00
function.status Add new functions flag -V/--inherit-variable 2014-10-02 18:41:39 -07:00
gen_output.fish Don't leave is_block in bad state after bad redirection 2014-09-30 17:06:56 -07:00
generic.expect Treat comments ending in backslashes as not continuing onto the next line 2015-05-02 18:22:20 -07:00
generic.expect.err Allow U+F8FF to be typed 2014-09-21 21:03:44 -07:00
generic.expect.out Allow U+F8FF to be typed 2014-09-21 21:03:44 -07:00
generic.expect.status Allow U+F8FF to be typed 2014-09-21 21:03:44 -07:00
history_sample_bash Support for importing fish 1.x's history and format, and also bash 2012-06-15 16:24:05 -07:00
history_sample_corrupt1 Improve history robustness against corrupt files 2014-07-29 14:42:03 -07:00
history_sample_fish_1_x Support for importing fish 1.x's history and format, and also bash 2012-06-15 16:24:05 -07:00
history_sample_fish_2_0 Support for importing fish 1.x's history and format, and also bash 2012-06-15 16:24:05 -07:00
indent.err Implement tests for fish_indent 2014-12-23 15:46:47 -08:00
indent.in enhance fish_indent to normalize keywords 2016-04-10 18:40:11 -07:00
indent.out enhance fish_indent to normalize keywords 2016-04-10 18:40:11 -07:00
indent.status Implement tests for fish_indent 2014-12-23 15:46:47 -08:00
interactive.config Tweak test runner to set up environment better 2014-11-24 01:51:07 -08:00
interactive.expect.rc Tests: Add fish_mode_prompt to except_prompt 2016-04-26 15:21:15 +02:00
interactive.fish retry flakey tests on failure 2016-04-11 16:47:46 -07:00
line-continuation.err fix handling of line continuation in keywords 2016-04-08 21:05:46 -07:00
line-continuation.in fix handling of line continuation in keywords 2016-04-08 21:05:46 -07:00
line-continuation.out fix handling of line continuation in keywords 2016-04-08 21:05:46 -07:00
line-continuation.status fix handling of line continuation in keywords 2016-04-08 21:05:46 -07:00
math.err add floating point output to math command 2016-05-03 19:29:04 -07:00
math.in add floating point output to math command 2016-05-03 19:29:04 -07:00
math.out add floating point output to math command 2016-05-03 19:29:04 -07:00
math.status add floating point output to math command 2016-05-03 19:29:04 -07:00
printf.err Added test cases for printf builtin 2013-03-03 00:45:34 +05:30
printf.in Make octal/hex escapes in printf and echo output literal bytes 2015-01-15 11:21:07 -08:00
printf.out Make octal/hex escapes in printf and echo output literal bytes 2015-01-15 11:21:07 -08:00
printf.status Added test cases for printf builtin 2013-03-03 00:45:34 +05:30
read.err read: Support arrays, character splitting 2014-07-14 00:46:38 -07:00
read.expect Add a test harness for interactive behavior 2014-09-07 23:56:59 -07:00
read.expect.err Add a test harness for interactive behavior 2014-09-07 23:56:59 -07:00
read.expect.out Add a test harness for interactive behavior 2014-09-07 23:56:59 -07:00
read.expect.status Add a test harness for interactive behavior 2014-09-07 23:56:59 -07:00
read.in Fix incorrect error on read with 1-character input 2014-09-21 20:00:26 -07:00
read.out Fix incorrect error on read with 1-character input 2014-09-21 20:00:26 -07:00
read.status read: Support arrays, character splitting 2014-07-14 00:46:38 -07:00
status.err Don't leave is_block in bad state after bad redirection 2014-09-30 17:06:56 -07:00
status.in Revert "tests/status.in: fix test for locale, fall back to default strings" 2014-11-25 00:51:39 -08:00
status.out Base status -b off the parser execution stack 2014-09-30 20:58:45 -07:00
status.status Don't leave is_block in bad state after bad redirection 2014-09-30 17:06:56 -07:00
string.err tests/string.in: add tests for string builtin 2015-10-09 11:27:18 +08:00
string.in Implement an --invert/-v for string match, like grep -v. 2016-04-08 10:49:29 +08:00
string.out Implement an --invert/-v for string match, like grep -v. 2016-04-08 10:49:29 +08:00
string.status tests/string.in: add tests for string builtin 2015-10-09 11:27:18 +08:00
test.fish make testing on local servers hermetic 2016-02-25 17:16:36 -08:00
test1.err Add subdirectories 2005-09-20 23:31:55 +10:00
test1.in fix setting of $argv for source w/no args 2016-04-06 13:04:44 -07:00
test1.out fix setting of $argv for source w/no args 2016-04-06 13:04:44 -07:00
test1.status Add subdirectories 2005-09-20 23:31:55 +10:00
test2.err Add subdirectories 2005-09-20 23:31:55 +10:00
test2.in remove trialing spaces #2 2010-09-18 10:18:26 +08:00
test2.out Add subdirectories 2005-09-20 23:31:55 +10:00
test2.status Add subdirectories 2005-09-20 23:31:55 +10:00
test3.err Add subdirectories 2005-09-20 23:31:55 +10:00
test3.in make testing on local servers hermetic 2016-02-25 17:16:36 -08:00
test3.out Correctly un-export an env var when it is shadowed 2015-06-12 16:05:59 -07:00
test3.status Add subdirectories 2005-09-20 23:31:55 +10:00
test4.err Add subdirectories 2005-09-20 23:31:55 +10:00
test4.in Make 'set -ql' search up to function scope 2015-10-23 15:15:39 -07:00
test4.out Make 'set -ql' search up to function scope 2015-10-23 15:15:39 -07:00
test4.status Add subdirectories 2005-09-20 23:31:55 +10:00
test5.err Reinstate failglob behaviour for most commands 2016-02-15 13:13:28 -08:00
test5.in make testing on local servers hermetic 2016-02-25 17:16:36 -08:00
test5.out make testing on local servers hermetic 2016-02-25 17:16:36 -08:00
test5.status Add subdirectories 2005-09-20 23:31:55 +10:00
test6.err Fix for https://github.com/ridiculousfish/fishfish/issues/2 2012-05-11 18:59:38 -07:00
test6.in Migrate PATH-completion logic from complete.cpp to expand.cpp 2016-04-07 20:15:32 -07:00
test6.out Migrate PATH-completion logic from complete.cpp to expand.cpp 2016-04-07 20:15:32 -07:00
test6.status Fix for https://github.com/ridiculousfish/fishfish/issues/2 2012-05-11 18:59:38 -07:00
test7.err Add a test case for switch error code (issue #161) 2012-06-24 13:43:44 -07:00
test7.in Update tests for new type behavior 2014-07-13 19:11:29 -07:00
test7.out Finish rewriting detect_errors to use new parser. All tests now pass (!) 2013-12-12 18:18:07 -08:00
test7.status Add a test case for switch error code (issue #161) 2012-06-24 13:43:44 -07:00
test8.err Add variable expand ranges 2012-07-08 09:19:11 +08:00
test8.in Allow and/or statements to attach to the if/while header 2015-12-19 14:49:07 -08:00
test8.out Write tests for new if/and/or behavior (#1428) 2015-12-19 11:32:57 -08:00
test8.status Add variable expand ranges 2012-07-08 09:19:11 +08:00
test9.err Improve error reporting for unclosed blocks 2014-10-14 00:41:39 -07:00
test9.in make testing on local servers hermetic 2016-02-25 17:16:36 -08:00
test9.out psub: add -s, --suffix 2015-11-14 13:15:30 +01:00
test9.status include fixes and suggestions from code review 2012-12-22 18:38:28 +01:00
test_util.fish make testing on local servers hermetic 2016-02-25 17:16:36 -08:00
top.out Don't leave is_block in bad state after bad redirection 2014-09-30 17:06:56 -07:00