Skip to content

Commit

Permalink
Merge pull request ElektraInitiative#4707 from joni1993/fixrecordertests
Browse files Browse the repository at this point in the history
[FLOSS T1] shellrecorder: fix/extends two shell recorder checks
  • Loading branch information
markus2330 authored Nov 24, 2022
2 parents f7874ef + cb1d617 commit 3ab2721
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion doc/news/_preparation_next_release.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ This section keeps you up-to-date with the multi-language support provided by El
- <<TODO>>
- Sed: Add spelling correction for "key-value storage" _(@Bujuhu)_
- <<TODO>>
- <<TODO>>
- Fix/extends some shell recorder tests _(@Joni1993)_
- <<TODO>>
- <<TODO>>
- Fix warning parsing in shell recorder _(@Joni1993)_
Expand Down
2 changes: 1 addition & 1 deletion tests/shell/shell_recorder/mathcheck.esr
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ STDOUT: 5
< kdb set $Mountpoint/check/k 7.6
< kdb meta-set $Mountpoint/check/k check/math "== + ../a ../b"

ERROR: 123
ERROR: C03200
< kdb set $Mountpoint/check/k 7.7

RET: 0
Expand Down
20 changes: 14 additions & 6 deletions tests/shell/shell_recorder/selftest.esr
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,25 @@ File: config.ini
RET: 0
< kdb mount $File $Mountpoint $Storage

STDOUT: Create a new key user:/test/key with string "value"
STDOUT: Create a new key user:/tests/key with string "value"
< kdb set $Mountpoint/key value

STDOUT: Set string to "value"
< kdb set $Mountpoint/key value

STDOUT-REGEX: .*value.
< kdb set $Mountpoint/key value
STDOUT-REGEX: .*value2.
< kdb set $Mountpoint/key2 value2

STDOUT: user:/tests/keyuser:/tests/key2
< kdb find -0 user:/tests

STDERR: The command kdb.* not-a-command is not known
STDERR: The command .*kdb.* not-a-command is not known
< kdb not-a-command 1>/dev/null

STDERR: .+not-a-command.+
< kdb not-a-command 1>/dev/null

STDOUT: Create a new key user:/test/\/evil\\\/tripleEscaped\\/doubleEscaped/key/.withADot/..andADoubleDot with string "txt"
STDOUT: Create a new key user:/tests/\/evil\\\/tripleEscaped\\/doubleEscaped/key/.withADot/..andADoubleDot with string "txt"
< kdb set $Mountpoint/\\/evil\\\\\\/tripleEscaped\\\\/doubleEscaped/key/.withADot/..andADoubleDot txt

< cat > `kdb file $Mountpoint` <<EOF
Expand All @@ -32,10 +35,15 @@ STDOUT: Create a new key user:/test/\/evil\\\/tripleEscaped\\/doubleEscaped/key/
STDOUT: [section]⏎key="multi⏎line"
< cat `kdb file $Mountpoint`

WARNINGS: 175,175
WARNINGS: C03100,C03100
< kdb ls $Mountpoint

< kdb rm -r $Mountpoint

RET: 0
< kdb umount $Mountpoint

STDERR: Regex error.*
< kdb find "["


0 comments on commit 3ab2721

Please sign in to comment.