Expectation handler no longer receives extra newline
parent
a59a09007b
commit
76e90de26d
2
src/spec
2
src/spec
|
@ -187,7 +187,7 @@ _handle-to()
|
||||||
# shift argument allows the implementation to vary without breaking BC so
|
# shift argument allows the implementation to vary without breaking BC so
|
||||||
# long as the meaning of the shifted arguments do not change
|
# long as the meaning of the shifted arguments do not change
|
||||||
$assert "$__spec_rexit" $__SHIFTN "$__spec_errpath" "$@" \
|
$assert "$__spec_rexit" $__SHIFTN "$__spec_errpath" "$@" \
|
||||||
<<< "$__spec_result"
|
< <( echo -n "$__spec_result" )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -193,6 +193,21 @@ describe expect
|
||||||
end
|
end
|
||||||
'; to succeed
|
'; to succeed
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# that is, if we use <<< to provide premise output from memory, a
|
||||||
|
# newline will be added; we don't want that!
|
||||||
|
it does not have newline added to premise output if missing
|
||||||
|
expect test-run <<< '
|
||||||
|
_expect--chk() { test "$( wc -c )" -eq 0; }
|
||||||
|
|
||||||
|
describe foo
|
||||||
|
it should not add newline
|
||||||
|
expect true
|
||||||
|
to chk
|
||||||
|
end
|
||||||
|
end
|
||||||
|
'; to succeed
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue