diff options
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/resolve_deps.basic.sh | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/tests/resolve_deps.basic.sh b/tests/resolve_deps.basic.sh index ca49286..b0b938e 100755 --- a/tests/resolve_deps.basic.sh +++ b/tests/resolve_deps.basic.sh @@ -26,13 +26,20 @@ foo: baz bar: qux baz: quux " -results='foo bar baz qux quux' -test_results="$(resolve_deps "${pkgs}" "${deps}")" +main() +{ + local results= + local test_results= -test_diff "${results}" "${test_results}" + results='foo bar baz qux quux' + test_results="$(resolve_deps "${pkgs}" "${deps}")" + test_diff "${results}" "${test_results}" -results="$(printf '%s\n' ${results} | sort)" -test_results="$(printf '%s\n' $(resolve_deps "${pkgs}" "${deps}") | sort)" + results="$(printf '%s\n' ${results} | sort)" + test_results="$(printf '%s\n' $(resolve_deps "${pkgs}" "${deps}") | \ + sort)" + test_diff "${results}" "${test_results}" -test_diff "${results}" "${test_results}" + return 0 +} |