mirror of
https://github.com/systemd/systemd.git
synced 2025-01-09 01:18:19 +03:00
test: add test case for issue #31776
This commit is contained in:
parent
cb2be36650
commit
bf995423fd
@ -275,3 +275,11 @@ hello
|
||||
world
|
||||
EOF
|
||||
rm -f "$CURSOR_FILE"
|
||||
|
||||
# Check that --until works with --after-cursor and --lines/-n
|
||||
# See: https://github.com/systemd/systemd/issues/31776
|
||||
CURSOR_FILE="$(mktemp)"
|
||||
journalctl -q -n 0 --cursor-file="$CURSOR_FILE"
|
||||
TIMESTAMP="$(journalctl -q -n 1 --cursor="$(<"$CURSOR_FILE")" --output=short-unix | cut -d ' ' -f 1 | cut -d '.' -f 1)"
|
||||
[[ -z "$(journalctl -q -n 10 --after-cursor="$(<"$CURSOR_FILE")" --until "@$((TIMESTAMP - 3))")" ]]
|
||||
rm -f "$CURSOR_FILE"
|
||||
|
Loading…
Reference in New Issue
Block a user