mirror of
https://github.com/ddworken/hishtory.git
synced 2025-06-21 12:34:32 +02:00
More filtering for tests
This commit is contained in:
parent
86adcb64f6
commit
7005e15b15
@ -135,7 +135,7 @@ const (
|
|||||||
Offline
|
Offline
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestParameterized(t *testing.T) {
|
func TestP(t *testing.T) {
|
||||||
if skipSlowTests() {
|
if skipSlowTests() {
|
||||||
shellTesters = shellTesters[:1]
|
shellTesters = shellTesters[:1]
|
||||||
}
|
}
|
||||||
@ -1235,7 +1235,7 @@ func testInstallViaPythonScript(t *testing.T, tester shellTester) {
|
|||||||
|
|
||||||
// And test that it recorded that command
|
// And test that it recorded that command
|
||||||
time.Sleep(time.Second)
|
time.Sleep(time.Second)
|
||||||
out = tester.RunInteractiveShell(t, `hishtory export | grep -v pipefail`)
|
out = tester.RunInteractiveShell(t, `hishtory export -pipefail`)
|
||||||
if out != "hishtory status\n" {
|
if out != "hishtory status\n" {
|
||||||
t.Fatalf("unexpected output from hishtory export=%#v", out)
|
t.Fatalf("unexpected output from hishtory export=%#v", out)
|
||||||
}
|
}
|
||||||
@ -2397,7 +2397,7 @@ func fuzzTest(t *testing.T, tester shellTester, input string) {
|
|||||||
keyToCommands[op.device.key] = val
|
keyToCommands[op.device.key] = val
|
||||||
|
|
||||||
// Run hishtory export and check the output
|
// Run hishtory export and check the output
|
||||||
out, err := tester.RunInteractiveShellRelaxed(t, `hishtory export | grep -v export`)
|
out, err := tester.RunInteractiveShellRelaxed(t, `hishtory export -export -pipefail`)
|
||||||
testutils.Check(t, err)
|
testutils.Check(t, err)
|
||||||
expectedOutput := keyToCommands[op.device.key]
|
expectedOutput := keyToCommands[op.device.key]
|
||||||
if diff := cmp.Diff(expectedOutput, out); diff != "" {
|
if diff := cmp.Diff(expectedOutput, out); diff != "" {
|
||||||
@ -2408,7 +2408,7 @@ func fuzzTest(t *testing.T, tester shellTester, input string) {
|
|||||||
// Check that hishtory export has the expected results
|
// Check that hishtory export has the expected results
|
||||||
for _, op := range ops {
|
for _, op := range ops {
|
||||||
switchToDevice(&devices, op.device)
|
switchToDevice(&devices, op.device)
|
||||||
out, err := tester.RunInteractiveShellRelaxed(t, `hishtory export | grep -v export`)
|
out, err := tester.RunInteractiveShellRelaxed(t, `hishtory export -export -pipefail`)
|
||||||
testutils.Check(t, err)
|
testutils.Check(t, err)
|
||||||
expectedOutput := keyToCommands[op.device.key]
|
expectedOutput := keyToCommands[op.device.key]
|
||||||
if diff := cmp.Diff(expectedOutput, out); diff != "" {
|
if diff := cmp.Diff(expectedOutput, out); diff != "" {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user