mirror of
https://github.com/Lifailon/lazyjournal.git
synced 2026-11-11 01:09:46 +01:00
update keys on ascii
This commit is contained in:
@@ -15,25 +15,25 @@ trap "
|
||||
exit \$exitCode
|
||||
" EXIT
|
||||
|
||||
# Test journald
|
||||
# Test 1
|
||||
sleep 2
|
||||
tmux send-keys -t test-session "cron"
|
||||
tmux send-keys -t test-session "$(echo -e '\t')"
|
||||
tmux send-keys -t test-session "$(echo -e '\e[C')"
|
||||
tmux send-keys -t test-session "$(echo -e '\x1b[C')"
|
||||
sleep 2
|
||||
tmux send-keys -t test-session "$(echo -e '\r')"
|
||||
sleep 2
|
||||
tmux send-keys -t test-session "$(echo -e '\t\t\t')"
|
||||
tmux send-keys -t test-session "$(echo -e '\e[A')"
|
||||
tmux send-keys -t test-session "$(echo -e '\x1b[A')"
|
||||
tmux send-keys -t test-session "started"
|
||||
sleep 2
|
||||
if [ "$debug" == "true" ]; then tmux capture-pane -p; fi
|
||||
output=$(tmux capture-pane -p)
|
||||
|
||||
if echo "$output" | grep -q "Started cron"; then
|
||||
echo "✔ Test Journald: Passed"
|
||||
echo "✔ Test read journal from systemd-journald: Passed"
|
||||
else
|
||||
echo "❌ Test Journald: Failed"
|
||||
echo "❌ Test read journal from systemd-journald: Failed"
|
||||
exitCode=1
|
||||
fi
|
||||
|
||||
@@ -41,10 +41,10 @@ for i in {1..7}; do tmux send-keys -t test-session "$(echo -e '\x7f')"; done
|
||||
tmux send-keys -t test-session "$(echo -e '\t\t')"
|
||||
for i in {1..4}; do tmux send-keys -t test-session "$(echo -e '\x7f')"; done
|
||||
|
||||
# Test filesystem
|
||||
# Test 2
|
||||
tmux send-keys -t test-session "input"
|
||||
tmux send-keys -t test-session "$(echo -e '\t\t')"
|
||||
tmux send-keys -t test-session "$(echo -e '\e[C')"
|
||||
tmux send-keys -t test-session "$(echo -e '\x1b[C')"
|
||||
sleep 3
|
||||
tmux send-keys -t test-session "$(echo -e '\r')"
|
||||
sleep 3
|
||||
@@ -52,16 +52,16 @@ if [ "$debug" == "true" ]; then tmux capture-pane -p; fi
|
||||
output=$(tmux capture-pane -p)
|
||||
|
||||
if echo "$output" | grep -q "First line" && echo "$output" | grep -q "Second line"; then
|
||||
echo "✔ Test Filesystem: Passed"
|
||||
echo "✔ Test read file: Passed"
|
||||
else
|
||||
echo "❌ Test Filesystem: Failed"
|
||||
echo "❌ Test read file: Failed"
|
||||
exitCode=2
|
||||
fi
|
||||
|
||||
tmux send-keys -t test-session "$(echo -e '\t\t\t\t')"
|
||||
for i in {1..5}; do tmux send-keys -t test-session "$(echo -e '\x7f')"; done
|
||||
|
||||
# Test docker
|
||||
# Test 3
|
||||
tmux send-keys -t test-session "ping"
|
||||
tmux send-keys -t test-session "$(echo -e '\t\t\t')"
|
||||
tmux send-keys -t test-session "$(echo -e '\r')"
|
||||
@@ -73,8 +73,8 @@ if [ "$debug" == "true" ]; then tmux capture-pane -p; fi
|
||||
output=$(tmux capture-pane -p)
|
||||
|
||||
if echo "$output" | grep -q "The server is running on http://localhost:3005" && echo "$output" | grep -q "Local: http://localhost:8085"; then
|
||||
echo "✔ Test Docker: Passed"
|
||||
echo "✔ Test read log from docker container: Passed"
|
||||
else
|
||||
echo "❌ Test Docker: Failed"
|
||||
echo "❌ Test read log from docker container: Failed"
|
||||
exitCode=3
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user