mirror of
https://github.com/ddworken/hishtory.git
synced 2025-03-16 08:18:16 +01:00
Fix test that goes along with 5223d1ea55
This commit is contained in:
parent
78b719baf4
commit
dc7bc5a265
@ -279,7 +279,7 @@ func testIntegrationWithNewDevice(t *testing.T, tester shellTester) {
|
||||
if strings.Contains(out, "thisisnotrecorded") {
|
||||
t.Fatalf("hishtory export contains a command that should not have been recorded, out=%#v", out)
|
||||
}
|
||||
expectedOutputWithoutKey := "hishtory status\nhishtory query\nls /a\nls /bar\nls /foo\necho foo\necho bar\nhishtory enable\necho thisisrecorded\nhishtory query\nhishtory query foo\necho hello | grep complex | sed s/h/i/g; echo baz && echo \"fo 'o\"\nhishtory query complex\nhishtory query\necho mynewcommand\nhishtory query\nyes | hishtory init %s\nhishtory query\necho mynewercommand\nhishtory query\nothercomputer\nhishtory query\nhishtory reupload\n"
|
||||
expectedOutputWithoutKey := "hishtory status\nhishtory query\nls /a\nls /bar\nls /foo\necho foo\necho bar\nhishtory enable\necho thisisrecorded\nhishtory query\nhishtory query foo\necho hello | grep complex | sed s/h/i/g; echo baz && echo \"fo 'o\" # mycommand\nhishtory query complex\nhishtory query\necho mynewcommand\nhishtory query\nyes | hishtory init %s\nhishtory query\necho mynewercommand\nhishtory query\nothercomputer\nhishtory query\nhishtory reupload\n"
|
||||
expectedOutput := fmt.Sprintf(expectedOutputWithoutKey, userSecret)
|
||||
if diff := cmp.Diff(expectedOutput, out); diff != "" {
|
||||
t.Fatalf("hishtory export mismatch (-expected +got):\n%s\nout=%#v", diff, out)
|
||||
|
@ -13,7 +13,7 @@ set -emo pipefail
|
||||
hishtory query
|
||||
set -emo pipefail
|
||||
hishtory query foo
|
||||
echo hello | grep complex | sed s/h/i/g; echo baz && echo "fo 'o"
|
||||
echo hello | grep complex | sed s/h/i/g; echo baz && echo "fo 'o" # mycommand
|
||||
set -emo pipefail
|
||||
hishtory query complex
|
||||
set -emo pipefail
|
||||
|
@ -13,7 +13,7 @@ set -eo pipefail
|
||||
hishtory query
|
||||
set -eo pipefail
|
||||
hishtory query foo
|
||||
echo hello | grep complex | sed s/h/i/g; echo baz && echo "fo 'o"
|
||||
echo hello | grep complex | sed s/h/i/g; echo baz && echo "fo 'o" # mycommand
|
||||
set -eo pipefail
|
||||
hishtory query complex
|
||||
set -eo pipefail
|
||||
|
Loading…
Reference in New Issue
Block a user