Skip to content

Commit

Permalink
Test resetting our history
Browse files Browse the repository at this point in the history
  • Loading branch information
skx committed Jul 13, 2024
1 parent be24176 commit 7783a6e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,14 @@ func TestDriveChange(t *testing.T) {
out = strings.ReplaceAll(out, "\n", "")
out = strings.ReplaceAll(out, "\r", "")
if out != `A>C>C>` {

t.Fatalf("unexpected output '%v'", out)
}

// Reset the text - confirm it is now empty
l.Reset()
if l.GetOutput() != "" {
t.Fatalf("resetting our history didn't work")
}
}

// TestReadWriteRand invokes our help-samples to read/write
Expand Down Expand Up @@ -123,4 +128,10 @@ func TestCompleteLighthouse(t *testing.T) {
if !strings.Contains(out, "You won") {
t.Fatalf("failed to win")
}

// Reset the text - confirm it is now empty
l.Reset()
if l.GetOutput() != "" {
t.Fatalf("resetting our history didn't work")
}
}

0 comments on commit 7783a6e

Please sign in to comment.