diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-05-20 12:58:03 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-05-20 12:58:03 -0700 |
commit | 673faf715282ebc86a9b4f13bb450015136f9c3f (patch) | |
tree | 6e2dae7b100bc21c653c39359848885d42e923aa /fish_tests.cpp | |
parent | 18ace555b05042720c0cc037eb4cf8588285f596 (diff) |
Fixed builtin_test to properly handle "just a strings" in combining expressions, like 'test foo -a bar'. This was causing error messages in the help function.
Fixed help function to know about OS X and use the open command to open web pages.
Diffstat (limited to 'fish_tests.cpp')
-rw-r--r-- | fish_tests.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fish_tests.cpp b/fish_tests.cpp index 97f86d6e..a6b4b2ab 100644 --- a/fish_tests.cpp +++ b/fish_tests.cpp @@ -649,7 +649,7 @@ static bool run_test_test(int expected, const wcstring &str) { static void test_test() { say(L"Testing test builtin"); - + assert(run_test_test(0, L"5 -ne 6")); assert(run_test_test(0, L"5 -eq 5")); assert(run_test_test(0, L"0 -eq 0")); @@ -693,11 +693,14 @@ static void test_test() { assert(run_test_test(0, L"-d /bin/")); assert(run_test_test(1, L"-d /bin/ls")); - /* This failed at once point */ + /* This failed at one point */ assert(run_test_test(1, L"-d /bin -a 5 -eq 3")); assert(run_test_test(0, L"-d /bin -o 5 -eq 3")); assert(run_test_test(0, L"-d /bin -a ! 5 -eq 3")); - + + /* We didn't properly handle multiple "just strings" either */ + assert(run_test_test(0, L"foo")); + assert(run_test_test(0, L"foo -a bar")); } /** Testing colors */ |