-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix use flavor cmd #162
Fix use flavor cmd #162
Conversation
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a unit test to ensure the behavior of use
command is expected.
tests/test_init.sh
Outdated
test_use_cmd() { | ||
devenv add foo | ||
devenv use foo | ||
assertNotNull ${DEVENVFLAVOR} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think using assertNotContains
to check the result would be better
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What should be the value of $DEVENVFLAVOR
after devenv use foo
? If it should be foo
, perhaps this may use assertEqual
or something like it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have refine the test case in 9ca221e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's great. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's great to have a unit test for it!
tests/test_init.sh
Outdated
test_use_cmd() { | ||
devenv add foo | ||
devenv use foo | ||
assertNotNull ${DEVENVFLAVOR} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What should be the value of $DEVENVFLAVOR
after devenv use foo
? If it should be foo
, perhaps this may use assertEqual
or something like it?
@yungyuc, @chestercheng this patch is ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
tests/test_init.sh
Outdated
test_use_cmd() { | ||
devenv add foo | ||
devenv use foo | ||
assertNotNull ${DEVENVFLAVOR} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's great. Thanks.
In this PR I fix a
use
command issue which is theuse
command will use an unavailable flavor.After:
Before: