Skip to content

Commit

Permalink
add unit test to test use cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
j8xixo12 committed May 5, 2024
1 parent 2ac8b8d commit 1e70d32
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ final_ret=0
./test_init_var.sh ; if [ $? != 0 ] ; then final_ret=1 ; fi
./test_bash_utils.sh ; if [ $? != 0 ] ; then final_ret=1 ; fi
./test_devenv_impl.sh ; if [ $? != 0 ] ; then final_ret=1 ; fi
./test_init.sh ; if [ $? != 0 ] ; then final_ret=1 ; fi

exit $final_ret
17 changes: 17 additions & 0 deletions tests/test_init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
. ../scripts/init

echo "*** test file: $(basename ${BASH_SOURCE[0]})"

test_use_cmd() {
devenv add foo
devenv use foo
assertNotNull ${DEVENVFLAVOR}
devenv off
devenv del foo
devenv use foo
assertNull "${DEVENVFLAVOR}"
}

# Load and run shUnit2.
. ./shunit2/shunit2

0 comments on commit 1e70d32

Please sign in to comment.