Added a couple more tests for mkcd

Also fixed the order of expected/actual for lsgrep test.
This commit is contained in:
Nils Winkler
2017-10-17 07:43:58 +02:00
parent da77e9506d
commit 395e9eff3c

View File

@@ -36,8 +36,15 @@ load ../../plugins/available/base.plugin
@test 'plugins base: mkcd()' {
cd "${BASH_IT_ROOT}"
run mkcd -dir_with_dash
declare -r dir_name="-dir_with_dash"
# Make sure that the directory does not exist prior to the test
rm -rf "${BASH_IT_ROOT}/${dir_name}"
mkcd "${dir_name}"
assert_success
assert_file_exist "${BASH_IT_ROOT}/${dir_name}"
assert_equal $(pwd) "${BASH_IT_ROOT}/${dir_name}"
}
@test 'plugins base: lsgrep()' {
@@ -45,7 +52,7 @@ load ../../plugins/available/base.plugin
cd $BASH_IT_TEST_DIR
run lsgrep 2
assert_success
assert_equal 2 $output
assert_equal $output 2
}
@test 'plugins base: buf()' {