mirror of
https://github.com/systemd/systemd.git
synced 2025-02-03 17:47:28 +03:00
tests: journal-stdout-stream: add cases for leading and trailing spaces
This commit is contained in:
parent
6f526243e6
commit
45d39b4f81
@ -21,5 +21,35 @@ journalctl --flush
|
||||
journalctl -b -o cat -t "$ID" >/output
|
||||
cmp /expected /output
|
||||
|
||||
# Remove trailing spaces
|
||||
ID=$(journalctl --new-id128 | sed -n 2p)
|
||||
printf "Trailing spaces\n">/expected
|
||||
printf $'<5>Trailing spaces \t \n' | systemd-cat -t "$ID" --level-prefix true
|
||||
journalctl --flush
|
||||
journalctl -b -o cat -t "$ID" >/output
|
||||
cmp /expected /output
|
||||
|
||||
ID=$(journalctl --new-id128 | sed -n 2p)
|
||||
printf "Trailing spaces\n">/expected
|
||||
printf $'Trailing spaces \t \n' | systemd-cat -t "$ID" --level-prefix false
|
||||
journalctl --flush
|
||||
journalctl -b -o cat -t "$ID" >/output
|
||||
cmp /expected /output
|
||||
|
||||
# Don't remove leading spaces
|
||||
ID=$(journalctl --new-id128 | sed -n 2p)
|
||||
printf $' \t Leading spaces\n'>/expected
|
||||
printf $'<5> \t Leading spaces\n' | systemd-cat -t "$ID" --level-prefix true
|
||||
journalctl --flush
|
||||
journalctl -b -o cat -t "$ID" >/output
|
||||
cmp /expected /output
|
||||
|
||||
ID=$(journalctl --new-id128 | sed -n 2p)
|
||||
printf $' \t Leading spaces\n'>/expected
|
||||
printf $' \t Leading spaces\n' | systemd-cat -t "$ID" --level-prefix false
|
||||
journalctl --flush
|
||||
journalctl -b -o cat -t "$ID" >/output
|
||||
cmp /expected /output
|
||||
|
||||
touch /testok
|
||||
exit 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user