mirror of
https://github.com/ddworken/hishtory.git
synced 2025-06-24 22:11:40 +02:00
Make testCustomColumns simpler and more reliable
This commit is contained in:
parent
eb85f9a293
commit
e886763144
@ -2035,10 +2035,10 @@ echo bar`)
|
|||||||
out = tester.RunInteractiveShell(t, `hishtory query -pipefail`)
|
out = tester.RunInteractiveShell(t, `hishtory query -pipefail`)
|
||||||
testutils.CompareGoldens(t, out, fmt.Sprintf("testCustomColumns-query-isAction=%v", testutils.IsGithubAction()))
|
testutils.CompareGoldens(t, out, fmt.Sprintf("testCustomColumns-query-isAction=%v", testutils.IsGithubAction()))
|
||||||
out = captureTerminalOutput(t, tester, []string{"hishtory SPACE tquery SPACE -pipefail ENTER"})
|
out = captureTerminalOutput(t, tester, []string{"hishtory SPACE tquery SPACE -pipefail ENTER"})
|
||||||
|
out = strings.TrimSpace(strings.Split(out, "hishtory tquery -pipefail")[1])
|
||||||
testName := "testCustomColumns-tquery-" + tester.ShellName()
|
testName := "testCustomColumns-tquery-" + tester.ShellName()
|
||||||
if testutils.IsGithubAction() {
|
if testutils.IsGithubAction() {
|
||||||
testName += "-isAction"
|
testName += "-isAction"
|
||||||
testName += "-" + runtime.GOOS
|
|
||||||
}
|
}
|
||||||
testutils.CompareGoldens(t, out, testName)
|
testutils.CompareGoldens(t, out, testName)
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,3 @@
|
|||||||
bash-5.2$ source /Users/david/.bashrc
|
|
||||||
bash-5.2$ hishtory tquery -pipefail
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Search Query: > -pipefail
|
Search Query: > -pipefail
|
||||||
|
|
||||||
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||||
|
@ -1,7 +1,3 @@
|
|||||||
ghaction-runner-hostname% hishtory tquery -pipefail
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Search Query: > -pipefail
|
Search Query: > -pipefail
|
||||||
|
|
||||||
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
@ -1,32 +0,0 @@
|
|||||||
bash-5.2$ source /Users/runner/.bashrc
|
|
||||||
bash-5.2$ hishtory tquery -pipefail
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Search Query: > -pipefail
|
|
||||||
|
|
||||||
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
||||||
│ Exit Code git_remote Command │
|
|
||||||
│──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────│
|
|
||||||
│ 0 https://github.com/ddworken/hishtory hishtory config-set displayed-columns 'Exit Code' git_remote Command │
|
|
||||||
│ 0 echo bar │
|
|
||||||
│ 0 cd / │
|
|
||||||
│ 0 https://github.com/ddworken/hishtory echo foo │
|
|
||||||
│ 0 https://github.com/ddworken/hishtory hishtory config-add custom-columns git_remote '(git remote -v 2>/dev/null | grep origin 1>/dev/null ) && git remote get-url origin || … │
|
|
||||||
│ 0 echo baz │
|
|
||||||
│ 0 cd / │
|
|
||||||
│ 0 echo $FOOBAR world │
|
|
||||||
│ 0 export FOOBAR='hello' │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
||||||
hiSHtory: Search your shell history • ctrl+h help
|
|
@ -1,32 +0,0 @@
|
|||||||
runner@ghaction-runner-hostname:~/work/hishtory/hishtory$ source /home/runner/.bashrc
|
|
||||||
runner@ghaction-runner-hostname:~/work/hishtory/hishtory$ hishtory tquery -pipefail
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Search Query: > -pipefail
|
|
||||||
|
|
||||||
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
||||||
│ Exit Code git_remote Command │
|
|
||||||
│──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────│
|
|
||||||
│ 0 https://github.com/ddworken/hishtory hishtory config-set displayed-columns 'Exit Code' git_remote Command │
|
|
||||||
│ 0 echo bar │
|
|
||||||
│ 0 cd / │
|
|
||||||
│ 0 https://github.com/ddworken/hishtory echo foo │
|
|
||||||
│ 0 https://github.com/ddworken/hishtory hishtory config-add custom-columns git_remote '(git remote -v 2>/dev/null | grep origin 1>/dev/null ) && git remote get-url origin || … │
|
|
||||||
│ 0 echo baz │
|
|
||||||
│ 0 cd / │
|
|
||||||
│ 0 echo $FOOBAR world │
|
|
||||||
│ 0 export FOOBAR='hello' │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
||||||
hiSHtory: Search your shell history • ctrl+h help
|
|
@ -1,7 +1,3 @@
|
|||||||
david@Davids-MacBook-Air hishtory % hishtory tquery -pipefail
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Search Query: > -pipefail
|
Search Query: > -pipefail
|
||||||
|
|
||||||
┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||||
|
@ -1,7 +1,3 @@
|
|||||||
runner@ghaction-runner-hostname hishtory % hishtory tquery -pipefail
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Search Query: > -pipefail
|
Search Query: > -pipefail
|
||||||
|
|
||||||
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
Loading…
x
Reference in New Issue
Block a user