summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2015-12-07 11:02:02 (EST)
committer P. J. McDermott <pj@pehjota.net>2015-12-07 11:02:02 (EST)
commitd805be059142cb508ef738e5ace95359c9a62e99 (patch)
treea0f255868616e4915b20d2eb6fbb4ae7326fabe4
parentda9d01c395e0db567dfd356c73576ea65a389ea5 (diff)
tests/resolve_deps.basic.sh: Define main()
-rwxr-xr-xtests/resolve_deps.basic.sh19
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
+}