@test "stars are bad" {
run echo '*'
[ "${lines[0]}" == "bug.bats" ]
[ "$output" == "*" ]
}
and run it. In one way or another, it should return a failure: there is just one output line and it can't be at the same time equal to bug.bats and *. But there is no failuer
✓ stars are bad
1 test, 0 failures
This seems to be due to the fact that in $output the * emitted by echo is correctly quoted, while the same does not happen for $lines.
Save the following test in a file named
bug.bats
and run it. In one way or another, it should return a failure: there is just one output line and it can't be at the same time equal to
bug.bats
and*
. But there is no failuerThis seems to be due to the fact that in
$output
the*
emitted by echo is correctly quoted, while the same does not happen for$lines
.