Commit Graph

3 Commits

Author SHA1 Message Date
Fabian Homborg
4c09012b0d tests: Don't rely on $HOME existing
Apparently the launchpad tests run with $HOME set to a nonexistent
directory. Since we just want *out*, let's just store the previous dir
and go back.
2020-12-29 12:48:11 +01:00
ridiculousfish
43505f7077 Allow ** glob segments to match zero directories
Prior to this change, a glob like `**/file.txt` would only match
`file.txt` in subdirectories; the `**` must match at least one directory.
This is historical behavior.

With this change we move a little closer to bash's implementation by
allowing a literal `**` segment to match in the current directory. That
is, `**/foo` will match both `foo` and `bar/foo`, while `b**/foo` will
only match `bar/foo`.

Fixes #7222.
2020-12-28 23:51:18 -08:00
ridiculousfish
6c08141682 Add a littlcheck glob test
We have some glob tests in fish_tests.cpp, but they are hard to follow.
Begin migrating them
2020-12-28 23:51:18 -08:00