| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
| |
Before running a command, we add the command to history, so
that if the command causes us to exit it's still captured in
history. But that command should not be considered part of
history when expanding the history within the command itself.
For example, `echo $history[1]` should be the previously
run command, not `echo $history[1]` itself.
Fixes #2028
|
| |
|
|
|
|
| |
Fixes #1929
|
| |
|
|
|
|
| |
Fixes #1894
|
| |
|
|
|
|
| |
Fixes #1665
|
| |
|
| |
|
|
|
|
|
|
| |
Example:
tests/test.fish expansion
This will run the tests in expansion.in only
|
| |
|
|
|
|
| |
This reverts commit 3b3fde1c5e5a2525fd4139c3853bfafab877950c.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
GNU and BSD `mktemp` handle options differently, and it's a useful
utility for tests. As such, define a common `mktemp` function wrapper
for the test suite.
It might actually be nice to expand this for more flags and support it
globally, but that may result in confusion for any users of BSD mktemp
that expect to be running /bin/mktemp.
|
|
|
|
|
|
| |
Update the test runners so they set up their own environment in
test_util.fish. This simplifies the Makefile and paves the way for
adding utility functions for use in the tests themselves.
|
|
|
|
| |
Fixes #1139
|
| |
|
|
|
|
|
|
|
| |
This means that # must be the first character of the string
to start a comment, in line with other shells
Fixes #953
|
|
|
|
| |
Fixes #1518
|
| |
|
|
|
|
| |
Work on #1133.
|
|
|
|
|
| |
This allows keywords to be quoted. However, they may not contain
variable or process expansions, etc. Fixes #1398
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prior to this change, inherited environment variables
would be split on colons, becoming an array. This change
eliminates that behavior. Now environment variables are
always split on the record separator character (ASCII 0x1e),
with the exception of a short whitelist of PATH, MANPATH,
CDPATH. Likewise, exported variables are also exported
delimited by rs, with the exception of the above whitelist.
Fixes #1374, also see #1656
|
|
|
|
|
|
|
|
| |
We can't use $PATHS to test the :-splitting because the global config
file adds extra paths based on /etc/paths and /etc/paths.d.
Ideally fish would have a way to suppress behavior like that, but for
the time being it doesn't.
|
|
|
|
| |
Closes #1746.
|
|
|
|
|
| |
Also do some minor formatting cleanup, make psub return 1 when executed
outside of a command substitution, and make it respect $TMPDIR.
|
|
|
|
|
|
|
|
|
|
| |
--inherit-variable takes a variable name and snapshots its current
value. When the function is executed, it will have a local variable with
this value already defined. Printing the function source will include
synthesized `set -l` lines for the values.
This is primarily useful for functions that are created on the fly, such
as in `psub`.
|
|
|
|
|
| |
Update the fishscript testrunner to use the same output style as the
interactive testrunner.
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of globally marking the state as "in block" when evaluating
blocks/functions, update the "in block" status when pushing/popping
blocks on the parser stack.
Fixes #1729.
On a side note, `status -b` is actually pretty useless, because it
always returns 0 inside of a function (even without this patch).
|
|
|
|
| |
Fixes #1728.
|
|
|
|
|
|
|
| |
It seems expect prioritizes the first pattern in the list, instead of
the pattern that matches earliest in the buffer. That seems pretty
stupid, but let's try moving the prompt pattern to the end and see if
that fixes the Travis failures.
|
|
|
|
|
|
| |
Also tweak colored output to reset before the newline instead of after,
so travis behaves better (for some reason reset causes travis to display
the line in black).
|
|
|
|
|
|
|
|
|
|
| |
Split test_interactive off from test_fishscript and add a new target
test_high_level that tests both.
Add some Makefile magic so the tests can be run serially without using
sub-make, which gets rid of a little noise from the make output.
Rewrite interactive tests to look better.
|
| |
|
|
|
|
|
|
| |
U+F8FF is the last character in the private use area, but it's also the
codepoint used for the Apple symbol (), which is typeable on US
keyboards in OS X, and so should actually work.
|
|
|
|
|
|
| |
When `read` is given a single character of input (including the
newline), it was bailing as if it had been given no input. This is
incorrect.
|
| |
|
|
|
|
|
|
|
|
| |
The `--null` flag to `read` makes it split incoming lines on NUL instead
of newlines. This is intended for processing the output of a command
that uses NUL separators (such as `find -print0`).
Fixes #1694.
|
| |
|
|
|
|
|
|
|
|
|
| |
Directories are completed like commands, because of implicit cd.
However, directories found inside $PATH entries should not be completed,
as implicit cd doesn't work there. Similarly, directories should not be
completed after the `command` builtin.
Fixes #1695.
|
|
|
|
|
|
|
|
|
|
|
| |
`exec` removes fish from the shell "stack", so SHLVL needs to be
decremented to match. This means `exec fish` will result in the same
SHLVL in the new fish instance.
Also tweak the SHLVL logic to interpret an environment SHLVL of "3foo"
as garbage instead of as the value "3".
Fixes #1693.
|
| |
|
|
|
|
|
|
|
| |
As far as I know we can't access the build artifacts from Travis, so we
can't check the interactive logs after a test failure. Add an
environment variable that causes the test runner to dump the logs
itself, and set that variable for Travis.
|
|
|
|
|
|
|
| |
Also avoid resetting bindings if fish_key_bindings is "modified" without
actually changing.
Fixes #1638.
|
|
|
|
|
|
|
| |
This was apparently what was interfering with the tests working on
Linux.
Tweak .travis.yml to install expect so the tests run on Linux.
|
|
|
|
|
|
|
| |
Add a test harness that uses `expect` to drive Fish to test interactive
behavior.
Include some tests for `read`.
|
|
|
|
|
|
|
|
|
| |
Split `make test` into two targets `make test_low_level` and `make
test_fishscript`, primarily so fishscript tests can be rechecked quickly
after edits.
Reformat the test.fish file and update some of the code to be a little
more straightforward (e.g. `if not cmd` instead of `if cmd; else`).
|
|
|
|
|
| |
Usage: read -n nchars
Reads maximum of nchars characters. If nchars <= 0, there's no limit.
|
|
|
|
|
| |
GNU sort behaves stupidly when LC_ALL is not C. This caused the test
output to be sorted wrong.
|