Skip to content
Snippets Groups Projects
Commit 09dcc55c authored by bgm47's avatar bgm47 :boy_tone1:
Browse files

update test

parent 98dcc9cf
Branches
No related tags found
No related merge requests found
...@@ -11,4 +11,23 @@ EOF ...@@ -11,4 +11,23 @@ EOF
# Assertions # Assertions
[ "$status" -eq 0 ] [ "$status" -eq 0 ]
} }
\ No newline at end of file
@test "Piped commands: echo, tr, and rev" {
run "./dsh" <<EOF
echo "hello world" | tr '[:lower:]' '[:upper:]' | rev
EOF
stripped_output=$(echo "$output" | tr -d '[:space:]')
expected_output="DLROWOLLEHdsh3>dsh3>cmdloopreturned0"
echo "Captured stdout:"
echo "Output: $output"
echo "Exit Status: $status"
echo "${stripped_output} -> ${expected_output}"
[ "$stripped_output" = "$expected_output" ]
[ "$status" -eq 0 ]
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment