summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2015-12-07 10:56:17 (EST)
committer P. J. McDermott <pj@pehjota.net>2015-12-07 10:56:17 (EST)
commit813382276dd9e463efaa7c36d46bd7577a9bd11e (patch)
tree962fd41b32286d3c885af7db20afe1509ecfa6c6
parent8838358943d2113d1c44767723d341fa982fdc07 (diff)
tests/parse_control.common.sh: Define main()
-rw-r--r--tests/parse_control.common.sh15
1 files changed, 10 insertions, 5 deletions
diff --git a/tests/parse_control.common.sh b/tests/parse_control.common.sh
index b989af3..9eee27b 100644
--- a/tests/parse_control.common.sh
+++ b/tests/parse_control.common.sh
@@ -36,10 +36,15 @@ para()
test_results="${test_results}ΒΆ${LF}"
}
-parse_control - field para "${req_fields}" <<-EOF
- ${packages}
- EOF
+main()
+{
+ parse_control - field para "${req_fields}" <<-EOF
+ ${packages}
+ EOF
+
+ printf 'Required fields: %s\n\n' "${req_fields}"
-printf 'Required fields: %s\n\n' "${req_fields}"
+ test_diff "${results}" "${test_results}"
-test_diff "${results}" "${test_results}"
+ return 0
+}