pike.git / lib / modules / Parser.pmod / testsuite.in

version» Context lines:

pike.git/lib/modules/Parser.pmod/testsuite.in:1:   START_MARKER      define(test_pike_token,[[   test_equal(Parser.Pike.low_split($1),({$1}))   ]]) + define(not_pike_token,[[ + test_equal(Parser.Pike.low_split($1),({})) + ]])      test_equal(Parser.Pike.low_split(""),({}))   test_pike_token("// 256 tokens")   test_pike_token("#\"\"") -  + not_pike_token("#\" ")   test_pike_token("# \"\"")   test_pike_token("#\"\\\"\"")   test_pike_token("#\"\\\\\"")   test_pike_token("#\" \"") -  + test_pike_token("#{ #}") + test_pike_token("# { #}") + not_pike_token("#{ ") + not_pike_token("#{ #") + not_pike_token("#{ #]") + test_pike_token("#( #)") + test_pike_token("# ( #)") + not_pike_token("#\x28 #}") + test_pike_token("#[ #]") + test_pike_token("# [ #]") + not_pike_token("#[ #}")   test_pike_token("#string\"\"")   test_pike_token("# string\"\"")   test_pike_token("# string \"\"")   test_pike_token("#string\" \"")   test_pike_token("#string<>")   test_pike_token("# string<>")   test_pike_token("# string <>")   test_pike_token("# string < >")   test_pike_token("#cpp statement")   test_pike_token("#cpp\\\nstatement")
pike.git/lib/modules/Parser.pmod/testsuite.in:133:   test_pike_token("@")   test_pike_token("/**/")   test_pike_token("/***/")   test_pike_token("/* ** **/")   test_pike_token("' '")   test_pike_token("'\\''")   test_pike_token("'\\ '")   test_pike_token("\"\"")   test_pike_token("\" \"")   test_pike_token("\"\\\"\"") + test_pike_token("FOO") + test_pike_token("FOO1_2") + test_pike_token("`FOO") + test_pike_token("`FOO1_2")      test_equal( Parser.Pike.split("\n// x\n"), ({ "\n", "// x", "\n\n" }) )   test_equal( Parser.Pike.split("\n// x"), ({ "\n", "// x", "\n" }) )    -  + test_any_equal([[ + string data = #"int i; + for(i=0; i<7; i++) + \tprintf(\"%d //\");"; + array a = Parser.C.split(data); + add_constant("split_data", a); + return a; + ]], ({ "int", " ", "i", ";", "\n", "for", "(", "i", "=", "0", ";", + " ", "i", "<", "7", ";", " ", "i", "++", ")", "\n\t", "printf", + "(", "\"%d //\"", ")", ";", "\n" })) +  + test_any_equal([[ + return Parser.C.tokenize(split_data)->text; + ]], ({ "int", " ", "i", ";", "\n", "for", "(", "i", "=", "0", ";", + " ", "i", "<", "7", ";", " ", "i", "++", ")", "\n\t", "printf", + "(", "\"%d //\"", ")", ";", "\n" })) +  + test_any_equal([[ + return Parser.C.tokenize(split_data)->line; + ]], ({1})*5 + ({2})*16 + ({3})*6)) +  + test_any_equal([[ + return Parser.C.tokenize(split_data,"a")->file; + ]], "a"*27/1) +  + test_any_equal([[ + return Parser.C.hide_whitespaces(Parser.C.tokenize(split_data))->text; + ]], ({ "int", "i", ";", "for", "(", "i", "=", "0", ";", + "i", "<", "7", ";", "i", "++", ")", "printf", + "(", "\"%d //\"", ")", ";" })) +  + test_any_equal([[ + return Parser.C.hide_whitespaces(Parser.C.tokenize(Parser.C.split("a \r\n\t\x2000\x2001 b")))->text; + ]], "ab"/1) +  + test_any_equal([[ + return Parser.C.simple_reconstitute(Parser.C.hide_whitespaces(Parser.C.tokenize(split_data))); + ]],#"int i; + for(i=0; i<7; i++) + \tprintf(\"%d //\");\n") +  + test_any_equal([[ + return Parser.C.reconstitute_with_line_numbers(Parser.C.hide_whitespaces(Parser.C.tokenize(split_data))); + ]],#"int i; + for(i=0; i<7; i++) + \tprintf(\"%d //\");\n") +  + test_any_equal([[ + return Parser.C.reconstitute_with_line_numbers(Parser.C.hide_whitespaces(Parser.C.tokenize(split_data, "a"))); + ]],#"#line 1 \"a\" + int i; + for(i=0; i<7; i++) + \tprintf(\"%d //\");\n") +  + test_do(add_constant("split_data")) +    test_equal([[    Parser.Tabular(#"\   1234563,\"20081128\",\"IC\",00000,8689839,\"KN: ARNL-1034758710-\",\"\",19.90,\"A\",\"M\",\"BETREFT:25399280 ACCESS INTERNET BV\",\"EUR\"   2348165,\"20081128\",\"DV\",00000,0,\"DEBETRENTE GIROKWARTAALKREDIET\",\"\",10.04,\"A\",\"M\",\"PER. 21/10-20/11 (1,15% PER MND)\",\"EUR\"   2341864,\"20081128\",\"DV\",00000,0,\"DEBETRENTE 1,39% PER MAAND,\",\"\",0.35,\"A\",\"M\",\"PERIODE 21/10 - 20/11\",\"EUR\"   ", #"\   [Tabular description begin]   csv   :gtz   ::mybankno [,]