summaryrefslogtreecommitdiff
path: root/src/reader_test.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2017-09-28 23:05:02 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2017-09-28 23:05:02 +0900
commitee40212e9772941b49a4bdb1e95f99913cdea469 (patch)
tree799667bda43ca07dbb33b3992f10ba6ea608062e /src/reader_test.go
parent7f5f6efbac677603181434193abbb2a8d550b8b5 (diff)
downloadfzf-ee40212e9772941b49a4bdb1e95f99913cdea469.tar.gz
Update FZF_DEFAULT_COMMAND
- Use bash for `set -o pipefail` - Fall back to simpler find command when the original command failed Related: #1061
Diffstat (limited to 'src/reader_test.go')
-rw-r--r--src/reader_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/reader_test.go b/src/reader_test.go
index 82ca6b7b..c29936ce 100644
--- a/src/reader_test.go
+++ b/src/reader_test.go
@@ -23,7 +23,7 @@ func TestReadFromCommand(t *testing.T) {
}
// Normal command
- reader.fin(reader.readFromCommand(`echo abc && echo def`))
+ reader.fin(reader.readFromCommand("sh", `echo abc && echo def`))
if len(strs) != 2 || strs[0] != "abc" || strs[1] != "def" {
t.Errorf("%s", strs)
}
@@ -48,7 +48,7 @@ func TestReadFromCommand(t *testing.T) {
reader.startEventPoller()
// Failing command
- reader.fin(reader.readFromCommand(`no-such-command`))
+ reader.fin(reader.readFromCommand("sh", `no-such-command`))
strs = []string{}
if len(strs) > 0 {
t.Errorf("%s", strs)