Expectation handler no longer receives extra newline

stderr
Mike Gerwitz 2014-05-13 00:50:52 -04:00
parent eb3e09b404
commit 76ab0ff50c
2 changed files with 16 additions and 1 deletions

View File

@ -187,7 +187,7 @@ _handle-to()
# shift argument allows the implementation to vary without breaking BC so
# long as the meaning of the shifted arguments do not change
$assert "$__spec_rexit" $__SHIFTN "$__spec_errpath" "$@" \
<<< "$__spec_result"
< <( echo -n "$__spec_result" )
}

View File

@ -193,6 +193,21 @@ describe expect
end
'; to succeed
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