File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -10,44 +10,44 @@ set -o pipefail
1010ID=$( journalctl --new-id128 | sed -n 2p)
1111> /expected
1212printf $' \n\n\n ' | systemd-cat -t " $ID " --level-prefix false
13- journalctl --flush
13+ journalctl --sync
1414journalctl -b -o cat -t " $ID " > /output
1515cmp /expected /output
1616
1717ID=$( journalctl --new-id128 | sed -n 2p)
1818> /expected
1919printf $' <5>\n <6>\n <7>\n ' | systemd-cat -t " $ID " --level-prefix true
20- journalctl --flush
20+ journalctl --sync
2121journalctl -b -o cat -t " $ID " > /output
2222cmp /expected /output
2323
2424# Remove trailing spaces
2525ID=$( journalctl --new-id128 | sed -n 2p)
2626printf " Trailing spaces\n" > /expected
2727printf $' <5>Trailing spaces \t \n ' | systemd-cat -t " $ID " --level-prefix true
28- journalctl --flush
28+ journalctl --sync
2929journalctl -b -o cat -t " $ID " > /output
3030cmp /expected /output
3131
3232ID=$( journalctl --new-id128 | sed -n 2p)
3333printf " Trailing spaces\n" > /expected
3434printf $' Trailing spaces \t \n ' | systemd-cat -t " $ID " --level-prefix false
35- journalctl --flush
35+ journalctl --sync
3636journalctl -b -o cat -t " $ID " > /output
3737cmp /expected /output
3838
3939# Don't remove leading spaces
4040ID=$( journalctl --new-id128 | sed -n 2p)
4141printf $' \t Leading spaces\n ' > /expected
4242printf $' <5> \t Leading spaces\n ' | systemd-cat -t " $ID " --level-prefix true
43- journalctl --flush
43+ journalctl --sync
4444journalctl -b -o cat -t " $ID " > /output
4545cmp /expected /output
4646
4747ID=$( journalctl --new-id128 | sed -n 2p)
4848printf $' \t Leading spaces\n ' > /expected
4949printf $' \t Leading spaces\n ' | systemd-cat -t " $ID " --level-prefix false
50- journalctl --flush
50+ journalctl --sync
5151journalctl -b -o cat -t " $ID " > /output
5252cmp /expected /output
5353
You can’t perform that action at this time.
0 commit comments