mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-14 14:23:47 -05:00
Change the tests to run on Windows (#2615)
Most of the "expected" strings in terminal.go test were changed to "text/template" values. Quotes in those string were parametrized in the templates. Two functions handling templates were added for convenience. Templates has the advantage of: - parametrize repetitive strings inside "expected" values - inner and outer quotes were parametrized in templates - long and confusing test values are more readable - templates can be localized for other operating systems
This commit is contained in:
committed by
GitHub
parent
0f02fc0c77
commit
88d74a15aa
@@ -22,7 +22,7 @@ func TestReadFromCommand(t *testing.T) {
|
||||
}
|
||||
|
||||
// Normal command
|
||||
reader.fin(reader.readFromCommand(nil, `echo abc && echo def`))
|
||||
reader.fin(reader.readFromCommand(nil, `echo abc&&echo def`))
|
||||
if len(strs) != 2 || strs[0] != "abc" || strs[1] != "def" {
|
||||
t.Errorf("%s", strs)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user