Skip to content

Conversation

@daveshepherd
Copy link

No description provided.

shunit2 Outdated
_shunit_assertFail "${shunit_message_:+${shunit_message_} }expected:<${shunit_expected_}> but was:<${shunit_actual_}>"
fi

unset shunit_message_ shunit_expected_ shunit_actual_
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add your new variable here.

shunit2 Outdated
shunit_message_=${shunit_message_%% }
_shunit_assertFail "${shunit_message_:+${shunit_message_} }expected:<${shunit_expected_}> but was:<${shunit_actual_}>"
if command [ $(echo "${shunit_expected_}" | wc -l) -gt 10 ] || command [ $(echo "${shunit_actual_}" | wc -l) -gt 10 ]; then
diff_output_=$(diff <(echo "${shunit_expected_}") <(echo "${shunit_actual_}"))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recognize process substitution <() as a Bashism, though I don't know the details.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is process substitution, it provides a way of passing the output of a command to another command where pipe is not available. diff takes filenames, but the items that want to be diff'd are in variables.
I suspect this might be why the tests are failing, as it probably doesn't work in other shells.
If anyone has any suggestions on how I can do this differently then let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants