Changeset 7290
- Timestamp:
- 18/03/11 19:54:48 (14 months ago)
- Files:
-
- 1 modified
-
branches/dev/ARBDB/adquery.cxx (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/dev/ARBDB/adquery.cxx
r7289 r7290 941 941 if (c=='\\') { 942 942 *(s2++) = c; 943 if (!(c=* s1)) { break; }943 if (!(c=*++s1)) { break; } 944 944 *(s2++) = c; 945 945 continue; … … 1008 1008 } 1009 1009 else { 1010 int argcparam = 0; 1011 char *bracket = strchr(s1, '('); 1010 int argcparam = 0; 1011 char *bracket = strchr(s1, '('); 1012 1012 1013 if (bracket) { // I got the parameter list 1013 1014 int slen; … … 1181 1182 #include <arbdbt.h> 1182 1183 1183 #define TEST_CI (input,cmd,expected) do {\1184 char *result; \1184 #define TEST_CI__INTERNAL(input,cmd,expected,TEST_RESULT) do { \ 1185 char *result; \ 1185 1186 TEST_ASSERT_RESULT__NOERROREXPORTED(result = GB_command_interpreter(gb_main, input, cmd, gb_data, NULL)); \ 1186 TEST_ ASSERT_EQUAL(result,expected);\1187 TEST_RESULT(result,expected); \ 1187 1188 free(result); \ 1188 1189 } while(0) 1190 1191 1192 #define TEST_CI(input,cmd,expected) TEST_CI__INTERNAL(input,cmd,expected,TEST_ASSERT_EQUAL) 1193 #define TEST_CI__BROKEN(input,cmd,expected) TEST_CI__INTERNAL(input,cmd,expected,TEST_ASSERT_EQUAL__BROKEN) 1189 1194 1190 1195 #define TEST_CI_ERROR(input,cmd,error_expected) do { \ … … 1228 1233 1229 1234 // escaping (@@@ wrong behavior?) 1230 TEST_CI("b\\a", "|count(\\a)", "2"); // i would expect '1' as result (the 'a'), but it counts '\\' and 'a' 1231 TEST_CI("b\\a", "|contains(\\)", "0"); // searches for 2 backslashes (should search for one) 1232 TEST_CI("b\\a", "|contains(\"\\\\\")", "0"); // searches for 2 backslashes 1235 TEST_CI("b\\a", "|count(\\a)", "2"); // i would expect '1' as result (the 'a'), but it counts '\\' and 'a' 1236 TEST_CI("b\\a", "|contains(\"\\\\\")", "0"); // searches for 2 backslashes(ok) 1237 TEST_CI__BROKEN("b\\a", "|contains(\\)", "1"); // searches for 1 backslash (ok), but reports two hits instead of one 1238 TEST_CI__BROKEN("b\\\\a", "|contains(\"\\\\\")", "1"); // searches for 2 backslashes (ok), but reports two hits instead of one 1233 1239 TEST_CI_ERROR("b\\a", "|contains(\"\\\")", "ARB ERROR: unbalanced '\"' in '|contains(\"\\\")'"); // raises error (should searches for 1 backslash) 1234 1240
