Skip to content
Snippets Groups Projects
Commit 3ab7bf5d authored by Vanshika Mohan Bongade's avatar Vanshika Mohan Bongade
Browse files

Upload New File

parent c5c1ec09
Branches
No related tags found
No related merge requests found
#!/usr/bin/env bats
############################ DO NOT EDIT THIS FILE #####################################
# File: assignment_tests.sh
#
# DO NOT EDIT THIS FILE
#
# Add/Edit Student tests in student_tests.sh
#
# All tests in this file must pass - it is used as part of grading!
########################################################################################
@test "Pipes" {
run "./dsh" <<EOF
ls | grep dshlib.c
EOF
# Strip spaces and newlines from the output
stripped_output=$(echo "$output" | tr -d '[:space:]')
# Adjusted expected output format
expected_output="dshlib.c"
# Debugging output if test fails
echo "Captured stdout:"
echo "Output: $output"
echo "Exit Status: $status"
echo "${stripped_output} -> ${expected_output}"
# Check for expected output
[[ "$stripped_output" == *"$expected_output"* ]]
# Assertions
[ "$status" -eq 0 ]
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment