mirror of
https://github.com/ddworken/hishtory.git
synced 2025-02-16 18:41:03 +01:00
Add more precise assertions for installs from python scripts
This commit is contained in:
parent
e5764c6f07
commit
4b058298b9
@ -1057,13 +1057,23 @@ func TestInstallViaPythonScriptInOfflineMode(t *testing.T) {
|
||||
defer testutils.BackupAndRestore(t)()
|
||||
defer testutils.BackupAndRestoreEnv("HISHTORY_OFFLINE")()
|
||||
os.Setenv("HISHTORY_OFFLINE", "1")
|
||||
tester := zshTester{}
|
||||
|
||||
testInstallViaPythonScriptChild(t, zshTester{})
|
||||
// Check that installing works
|
||||
testInstallViaPythonScriptChild(t, tester)
|
||||
|
||||
// And check that it installed in offline mode
|
||||
out := tester.RunInteractiveShell(t, `hishtory status`)
|
||||
require.Contains(t, out, "\nSync Mode: Disabled\n")
|
||||
}
|
||||
|
||||
func testInstallViaPythonScript(t *testing.T, tester shellTester) {
|
||||
defer testutils.BackupAndRestore(t)()
|
||||
testInstallViaPythonScriptChild(t, tester)
|
||||
|
||||
// And check that it installed in online mode
|
||||
out := tester.RunInteractiveShell(t, `hishtory status`)
|
||||
require.Contains(t, out, "\nSync Mode: Enabled\n")
|
||||
}
|
||||
|
||||
func testInstallViaPythonScriptChild(t *testing.T, tester shellTester) {
|
||||
|
Loading…
Reference in New Issue
Block a user