Commit Graph

24 Commits

Author SHA1 Message Date
Fabian Homborg
c0d80ab996 Tighten MANPATH test
This is to fix tests on Travis, since that stores the commit message in an environment variable.

`env | grep MANPATH` of course picks it up and generates unwanted output.

Yes.
2017-04-18 22:42:38 +02:00
Kurtis Rader
c272584fec a step to remove __fish_sgrep per issue #2450 2017-04-11 21:46:46 -07:00
Kurtis Rader
8b67a1b26f make testing on local servers hermetic
I noticed while fixing issue #2702 that the fish program being tested
was sourcing config.fish files outside of the current build. This also
happens when Travis CI runs the tests but isn't an issue there because
of how Travis is configured to execute the tests.

I also noticed that running `make test` was polluting my personal fish
history; which will become a bigger problem if and when the fishd universal
var file is moved from $XDG_CONFIG_HOME to $XDG_DATA_HOME.

This change makes it possible for an individual to run the tests on
their local machine secure in the knowledge that only the config.fish and
related files from their git repository will be used and doing so won't
pollute their personal fish history.

Resolves #469
2016-02-25 17:16:36 -08:00
Fabian Homborg
b85a8bbbfe Rename sgrep to __fish_sgrep
Makes it harder to cause issues with aliases, see fish-shell#2245
2015-09-09 20:55:04 +02:00
ridiculousfish
f3560b8e62 Correctly un-export an env var when it is shadowed
Prior to this fix, if you exported a variable in one scope
and then unexported it in the next, it would remain exported.
Example:

    set -gx VAR 1
    function foo; set -l VAR; env; end
    foo

Here 'VAR' would be exported to 'env' because we failed to
notice that the env var is shadowed by an unexported variable.
This occurred at env var computation time, not in env_set!

Fixes #2132
2015-06-12 16:05:59 -07:00
ridiculousfish
f30872a7b5 Recalculate exported variables when universal variable is erased
Fixes #2046
2015-04-29 17:28:49 -07:00
ridiculousfish
d7ba6e4a1d Properly fire events for universal variable changes
Fixes #1929
2015-02-03 16:13:02 -08:00
ridiculousfish
c0b8e81b02 Change how arrays and environment variables interact.
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
2014-10-12 15:01:44 -07:00
Kevin Ballard
a13e067b85 Fix test breakage from 14724401f
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.
2014-10-07 19:37:13 -07:00
David Adam
14724401ff env.cpp: correctly check variable_can_be_array
Closes #1746.
2014-10-08 09:53:29 +08:00
Kevin Ballard
940f264ee6 Decrement SHLVL when running exec
`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.
2014-09-19 17:38:54 -07:00
Kevin Ballard
130619d6b0 Fix $SHLVL
Due to being read-only, SHLVL wasn't being incremented properly for
recursive invocations of fish.
2014-08-29 12:22:35 -07:00
ridiculousfish
18c1b12741 Switch variable name in tests from foo to something less likely to be
used accidentally
2014-07-06 20:41:21 -07:00
ridiculousfish
b19f45e15d Add test for issue 1526 2014-07-06 18:12:18 -07:00
Jan Kanis
9ee7b0a501 really fix bug in export status of universal vars; add tests for that bug 2013-01-02 23:31:30 -08:00
ridiculousfish
39863ce4d7 Fix for longstanding bug where set -e would fail to erase elements from an array.
This was introduced in 7b3377e78c
2012-05-10 01:04:18 -07:00
Grissiom
70322077d2 remove trialing spaces #2 2010-09-18 10:18:26 +08:00
axel
bef7fff383 Do not test universal variable functionality since it relies on fish to be installed
darcs-hash:20060718173711-ac50b-1feae98c4c283bfa5bbc8dfedec3eb4641316a8d.gz
2006-07-19 03:37:11 +10:00
axel
20e5d298a0 Updates, bugfixing and minor edits on the test suite
darcs-hash:20060605133133-ac50b-e2ee5868f9f3ede147c7059d90c0f520ed905a5f.gz
2006-06-05 23:31:33 +10:00
axel
2fab5364e1 Fix broken regression test (irony?)
darcs-hash:20051002134406-ac50b-d9d3c94eb08ecd05be1a4e128ca08d9d3ae53978.gz
2005-10-02 23:44:06 +10:00
axel
1ecfc8e4c6 Minor fix in testsuite
darcs-hash:20050927174025-ac50b-554f6bf9aefc2da0b5a40baebb44bcd02a933704.gz
2005-09-28 03:40:25 +10:00
axel
e855f2dfc9 Update testsuite to reflect new variable scoping rules
darcs-hash:20050927083554-ac50b-80f5fcb0022416a80eb8d3aa673282a2c67d4dd4.gz
2005-09-27 18:35:54 +10:00
axel
6a3e73f87c Fix regression bug in regression test suite
darcs-hash:20050926141136-ac50b-864add3824c34e96ad56bc0e92537196992692b0.gz
2005-09-27 00:11:36 +10:00
axel
7ddecde543 Add subdirectories
darcs-hash:20050920133155-ac50b-9a14c6c664dd03afbe8e15e7c7998fcfb5c3c750.gz
2005-09-20 23:31:55 +10:00