Half implement querying based on relative and non-relative paths

This commit is contained in:
David Dworken
2022-06-12 20:28:33 -07:00
parent 334fbdcd03
commit af05d823fe
4 changed files with 35 additions and 25 deletions

View File

@ -52,6 +52,7 @@ func TestBuildHistoryEntry(t *testing.T) {
if !strings.HasPrefix(entry.CurrentWorkingDirectory, "/") && !strings.HasPrefix(entry.CurrentWorkingDirectory, "~/") {
t.Fatalf("history entry has unexpected cwd: %v", entry.CurrentWorkingDirectory)
}
// TODO: test relative_cwd
if entry.Command != "ls /foo" {
t.Fatalf("history entry has unexpected command: %v", entry.Command)
}
@ -74,6 +75,7 @@ func TestBuildHistoryEntry(t *testing.T) {
if !strings.HasPrefix(entry.CurrentWorkingDirectory, "/") && !strings.HasPrefix(entry.CurrentWorkingDirectory, "~/") {
t.Fatalf("history entry has unexpected cwd: %v", entry.CurrentWorkingDirectory)
}
// TODO: test relative_cwd
if entry.Command != "ls /foo" {
t.Fatalf("history entry has unexpected command: %v", entry.Command)
}