26 lines
641 B
Bash
Executable File
26 lines
641 B
Bash
Executable File
#!/bin/bash
|
|
# test_rebase_parser_all_valid_roles.sh - All three valid roles accepted
|
|
|
|
test_name="all_valid_roles"
|
|
|
|
content="pick 0 [user] hello
|
|
pick 1 [assistant] response
|
|
pick 2 [tool] result"
|
|
|
|
OUTPUT=$("${DRHARNESS}" -z 3 "$content")
|
|
|
|
if [ "$(rebase_role_at "$OUTPUT" 0)" != "user" ]; then
|
|
echo "FAIL: $test_name - expected user role at 0"
|
|
exit 1
|
|
fi
|
|
if [ "$(rebase_role_at "$OUTPUT" 1)" != "assistant" ]; then
|
|
echo "FAIL: $test_name - expected assistant role at 1"
|
|
exit 1
|
|
fi
|
|
if [ "$(rebase_role_at "$OUTPUT" 2)" != "tool" ]; then
|
|
echo "FAIL: $test_name - expected tool role at 2"
|
|
exit 1
|
|
fi
|
|
|
|
echo "PASS: $test_name"
|