mirror of
https://github.com/ddworken/hishtory.git
synced 2025-06-18 19:16:44 +02:00
Add some extra assertions to test various config-get commands
This commit is contained in:
parent
6071306372
commit
1be8e2cb47
@ -2389,6 +2389,9 @@ func TestTimestampFormat(t *testing.T) {
|
||||
entry2.ExitCode = 3
|
||||
manuallySubmitHistoryEntry(t, userSecret, entry2)
|
||||
|
||||
// Check the init the timestamp format
|
||||
require.Equal(t, "Jan 2 2006 15:04:05 MST", strings.TrimSpace(tester.RunInteractiveShell(t, ` hishtory config-get timestamp-format`)))
|
||||
|
||||
// Set a custom timestamp format
|
||||
tester.RunInteractiveShell(t, ` hishtory config-set timestamp-format '2006/Jan/2 15:04'`)
|
||||
|
||||
@ -2479,6 +2482,9 @@ func TestRemoveDuplicateRows(t *testing.T) {
|
||||
defer testutils.BackupAndRestore(t)()
|
||||
installHishtory(t, tester, "")
|
||||
|
||||
// Check the default
|
||||
require.Equal(t, "false", strings.TrimSpace(tester.RunInteractiveShell(t, ` hishtory config-get filter-duplicate-commands`)))
|
||||
|
||||
// Record a few commands and check that they get recorded and all are displayed in a table
|
||||
tester.RunInteractiveShell(t, `echo foo
|
||||
echo foo
|
||||
|
Loading…
x
Reference in New Issue
Block a user