mirror of
https://github.com/ddworken/hishtory.git
synced 2025-01-23 06:38:52 +01:00
added test for query that returns no results
This commit is contained in:
parent
b8240091cd
commit
1adcaeb6cf
@ -292,5 +292,11 @@ func TestAdvancedQuery(t *testing.T) {
|
||||
t.Fatalf("hishtory query has the wrong number of lines=%d, out=%#v", strings.Count(out, "\n"), out)
|
||||
}
|
||||
|
||||
// TODO: more tests for advanced queries
|
||||
// Query based on exit_code and something else that matches nothing
|
||||
out = RunInteractiveBashCommands(t, `hishtory query exit_code:127 foo`)
|
||||
if strings.Count(out, "\n") != 1 {
|
||||
t.Fatalf("hishtory query has the wrong number of lines=%d, out=%#v", strings.Count(out, "\n"), out)
|
||||
}
|
||||
|
||||
// TODO: test the username,hostname atoms
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user