mirror of
https://github.com/ddworken/hishtory.git
synced 2024-11-23 00:34:27 +01:00
Another attempt at fixing action tests
This commit is contained in:
parent
153e59eff3
commit
5554720451
@ -1720,16 +1720,15 @@ func TestFish(t *testing.T) {
|
||||
"echo SPACE bar ENTER",
|
||||
"echo SPACE '\"foo\"' ENTER",
|
||||
"SPACE echo SPACE foobar ENTER",
|
||||
"ls SPACE /bar/ SPACE '&' ENTER",
|
||||
"ls SPACE /tmp/ SPACE '&' ENTER",
|
||||
})
|
||||
if os.Getenv("GITHUB_ACTION") == "" {
|
||||
// This bit is broken on actions since actions run as a different user
|
||||
compareGoldens(t, out, "TestFish-capturedPane")
|
||||
if !strings.Contains(out, "Welcome to fish, the friendly interactive shell") || !strings.Contains(out, "foo") || !strings.Contains(out, "bar") || !strings.Contains(out, "baz") {
|
||||
t.Fatalf("fish output looks wrong")
|
||||
}
|
||||
|
||||
// Check export
|
||||
out = tester.RunInteractiveShell(t, `hishtory export | grep -v pipefail | grep -v ps`)
|
||||
expectedOutput := "echo foo\necho bar\necho \"foo\"\nls /bar/ &\n"
|
||||
expectedOutput := "echo foo\necho bar\necho \"foo\"\nls /tmp/ &\n"
|
||||
if diff := cmp.Diff(expectedOutput, out); diff != "" {
|
||||
t.Fatalf("hishtory export mismatch (-expected +got):\n%s\nout=%#v", diff, out)
|
||||
}
|
||||
|
@ -1,18 +0,0 @@
|
||||
Welcome to fish, the friendly interactive shell
|
||||
Type help for instructions on how to use fish
|
||||
david@Davids-MacBook-Air /> echo foo
|
||||
foo
|
||||
david@Davids-MacBook-Air />
|
||||
david@Davids-MacBook-Air /> echo baz
|
||||
baz
|
||||
david@Davids-MacBook-Air /> echo bar
|
||||
bar
|
||||
david@Davids-MacBook-Air /> echo "foo"
|
||||
foo
|
||||
david@Davids-MacBook-Air /> echo foobar
|
||||
foobar
|
||||
david@Davids-MacBook-Air /> ls /bar/ &
|
||||
ls: /bar/: No such file or directory
|
||||
|
||||
fish: Job 1, 'ls /bar/ &' has ended
|
||||
david@Davids-MacBook-Air / [1]>
|
@ -1,6 +1,6 @@
|
||||
CWD Hostname Exit Code Command
|
||||
/ ghaction-runner-hostname 0 hishtory config-set displayed-columns CWD Hostname 'Exit Code' Command
|
||||
/ ghaction-runner-hostname 1 ls /bar/ &
|
||||
/ ghaction-runner-hostname 0 ls /tmp/ &
|
||||
/ ghaction-runner-hostname 0 echo "foo"
|
||||
/ ghaction-runner-hostname 0 echo bar
|
||||
/ ghaction-runner-hostname 0 echo foo
|
||||
|
@ -28,4 +28,4 @@ Search Query: > -pipefail
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
@ -27,4 +27,4 @@ Search Query: > -pipefail
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
Loading…
Reference in New Issue
Block a user