Fix test that goes along with 5223d1ea55

This commit is contained in:
David Dworken 2022-11-04 21:05:44 -07:00
parent 78b719baf4
commit dc7bc5a265
No known key found for this signature in database
3 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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

View File

@ -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