From 3a18df0a183c081f2790f61a7c33931d2aa5cddb Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Mon, 1 Jul 2013 12:37:52 +0200 Subject: [PATCH] Add basic tests for parse-dotfile-options --- test/lib/parse-dotfile-options-test.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 test/lib/parse-dotfile-options-test.sh diff --git a/test/lib/parse-dotfile-options-test.sh b/test/lib/parse-dotfile-options-test.sh new file mode 100755 index 0000000..1e1f8a5 --- /dev/null +++ b/test/lib/parse-dotfile-options-test.sh @@ -0,0 +1,21 @@ +#! /usr/bin/env bash +source "../test-helper.sh" +source "../../src/lib/parse-dotfile-options.sh" + +# +# parse-dotfile-options() +# + +stub "parse-dotfile-root_link-option" +stub "parse-dotfile-default_action-option" + +parse-dotfile-options +assert 'echo "$OPT_ROOT_LINK"' \ + "parse-dotfile-root_link-option stub: " +assert 'echo "$OPT_DEFAULT_ACTION"' \ + "parse-dotfile-default_action-option stub: " + +restore "parse-dotfile-root_link-option" +restore "parse-dotfile-default_link-option" + +assert_end "parse-dotfile-options()"