diff --git a/src/func.cc b/src/func.cc index fbece878..e6dfbccc 100644 --- a/src/func.cc +++ b/src/func.cc @@ -740,7 +740,6 @@ static Value::VectorType search(const std::string &find, const std::string &tabl if (matchCount == 0) { gchar utf8_of_cp[6] = ""; //A buffer for a single unicode character to be copied into if (ptr_ft) g_utf8_strncpy(utf8_of_cp, ptr_ft, 1); - PRINTB(" WARNING: search term not found: \"%s\"", utf8_of_cp); } if (num_returns_per_match == 0 || num_returns_per_match > 1) { returnvec.push_back(Value(resultvec)); @@ -850,12 +849,6 @@ ValuePtr builtin_search(const Context *, const EvalContext *evalctx) } } if (num_returns_per_match == 1 && matchCount == 0) { - if (findThis->toVector()[i].type() == Value::NUMBER) { - PRINTB(" WARNING: search term not found: %s",findThis->toVector()[i].toDouble()); - } - else if (findThis->toVector()[i].type() == Value::STRING) { - PRINTB(" WARNING: search term not found: \"%s\"",findThis->toVector()[i].toString()); - } returnvec.push_back(resultvec); } if (num_returns_per_match == 0 || num_returns_per_match > 1) { @@ -863,7 +856,6 @@ ValuePtr builtin_search(const Context *, const EvalContext *evalctx) } } } else { - PRINTB(" WARNING: search: none performed on input %s", findThis); return ValuePtr::undefined; } return ValuePtr(returnvec); diff --git a/tests/regression/echotest/search-tests-expected.echo b/tests/regression/echotest/search-tests-expected.echo index 280a5bc7..cec6152c 100644 --- a/tests/regression/echotest/search-tests-expected.echo +++ b/tests/regression/echotest/search-tests-expected.echo @@ -1,9 +1,3 @@ - WARNING: search term not found: "q" - WARNING: search term not found: 1000 - WARNING: search term not found: "zzz" - WARNING: search term not found: "zzz" - WARNING: search term not found: 500 - WARNING: search term not found: "" ECHO: "Characters in string ("a"): [0]" ECHO: "Characters in string ("adeq"): [[0, 5], [3, 8], [4], []]" ECHO: "Default string search ("abe"): [0, 1, 8]" diff --git a/tests/regression/echotest/search-tests-unicode-expected.echo b/tests/regression/echotest/search-tests-unicode-expected.echo index 801bc8c8..e4d81a26 100644 --- a/tests/regression/echotest/search-tests-unicode-expected.echo +++ b/tests/regression/echotest/search-tests-unicode-expected.echo @@ -8,61 +8,31 @@ ECHO: "Expect [[0, 1]] for search(a, aaaa, 2)=[[0, 1]]. OK" ECHO: "Expect [[0, 1, 2]] for search(a, aaaa, 3)=[[0, 1, 2]]. OK" ECHO: "Expect [[0, 1, 2, 3]] for search(a, aaaa, 4)=[[0, 1, 2, 3]]. OK" ECHO: "Expect [[0, 1, 2, 3], [0, 1, 2, 3]] for search(aa, aaaa, 0)=[[0, 1, 2, 3], [0, 1, 2, 3]]. OK" - WARNING: search term not found: "b" ECHO: "Expect [] for search(b, aaaa)=[]. OK" - WARNING: search term not found: "b" ECHO: "Expect [] for search(b, aaaa, 1)=[]. OK" - WARNING: search term not found: "b" ECHO: "Expect [[]] for search(b, aaaa, 0)=[[]]. OK" - WARNING: search term not found: "b" ECHO: "Expect [[]] for search(b, aaaa, 2)=[[]]. OK" - WARNING: search term not found: "b" - WARNING: search term not found: "b" ECHO: "Expect [] for search(bb, aaaa)=[]. OK" - WARNING: search term not found: "b" - WARNING: search term not found: "b" ECHO: "Expect [] for search(bb, aaaa, 1)=[]. OK" - WARNING: search term not found: "b" - WARNING: search term not found: "b" ECHO: "Expect [[], []] for search(bb, aaaa, 0)=[[], []]. OK" - WARNING: search term not found: "b" - WARNING: search term not found: "b" ECHO: "Expect [[], []] for search(bb, aaaa, 2)=[[], []]. OK" ECHO: "Expect [] for search(, aaaa)=[]. OK" ECHO: "Expect [] for search(, )=[]. OK" - WARNING: search term not found: "a" ECHO: "Expect [] for search(a, )=[]. OK" ECHO: "----- Lookup of multi-byte into 1 byte" - WARNING: search term not found: "Л" ECHO: "Expect [] for search(Л, aaaa)=[]. OK" - WARNING: search term not found: "🂡" ECHO: "Expect [] for search(🂡, aaaa)=[]. OK" - WARNING: search term not found: "Л" ECHO: "Expect [[]] for search(Л, aaaa, 0)=[[]]. OK" - WARNING: search term not found: "🂡" ECHO: "Expect [[]] for search(🂡, aaaa, 0)=[[]]. OK" - WARNING: search term not found: "Л" - WARNING: search term not found: "Л" ECHO: "Expect [] for search(ЛЛ, aaaa)=[]. OK" - WARNING: search term not found: "🂡" - WARNING: search term not found: "🂡" ECHO: "Expect [] for search(🂡🂡, aaaa)=[]. OK" - WARNING: search term not found: "Л" - WARNING: search term not found: "Л" ECHO: "Expect [[], []] for search(ЛЛ, aaaa, 0)=[[], []]. OK" - WARNING: search term not found: "🂡" - WARNING: search term not found: "🂡" ECHO: "Expect [[], []] for search(🂡🂡, aaaa, 0)=[[], []]. OK" ECHO: "----- Lookup of 1-byte into multi-byte" - WARNING: search term not found: "a" ECHO: "Expect [] for search(a, ЛЛЛЛ)=[]. OK" - WARNING: search term not found: "a" ECHO: "Expect [] for search(a, 🂡🂡🂡🂡)=[]. OK" - WARNING: search term not found: "a" ECHO: "Expect [] for search(a, ЛЛЛЛ, 1)=[]. OK" - WARNING: search term not found: "a" ECHO: "Expect [[]] for search(a, 🂡🂡🂡🂡, 0)=[[]]. OK" - WARNING: search term not found: "a" ECHO: "Expect [[]] for search(a, 🂡🂡🂡🂡, 2)=[[]]. OK" ECHO: "----- Lookup of 1-byte into mixed multi-byte" ECHO: "Expect [0] for search(a, aЛaЛaЛaЛa)=[0]. OK" @@ -75,35 +45,27 @@ ECHO: "----- Lookup of 2-byte into 2-byte" ECHO: "Expect [0] for search(Л, ЛЛЛЛ)=[0]. OK" ECHO: "Expect [[0, 1, 2, 3]] for search(Л, ЛЛЛЛ, 0)=[[0, 1, 2, 3]]. OK" ECHO: "----- Lookup of 2-byte into 4-byte" - WARNING: search term not found: "Л" ECHO: "Expect [] for search(Л, 🂡🂡🂡🂡)=[]. OK" ECHO: "----- Lookup of 4-byte into 4-byte" ECHO: "Expect [0] for search(🂡, 🂡🂡🂡🂡)=[0]. OK" ECHO: "Expect [[0, 1, 2, 3]] for search(🂡, 🂡🂡🂡🂡, 0)=[[0, 1, 2, 3]]. OK" ECHO: "----- Lookup of 4-byte into 2-byte" - WARNING: search term not found: "🂡" ECHO: "Expect [] for search(🂡, ЛЛЛЛ)=[]. OK" ECHO: "----- Lookup of 2-byte into mixed multi-byte" ECHO: "Expect [1] for search(Л, aЛaЛaЛaЛa, 1)=[1]. OK" - WARNING: search term not found: "Л" ECHO: "Expect [] for search(Л, a🂡a🂡a🂡a🂡a, 1)=[]. OK" ECHO: "Expect [2] for search(Л, a🂡Л🂡a🂡Л🂡a, 1)=[2]. OK" ECHO: "Expect [[1, 3, 5, 7]] for search(Л, aЛaЛaЛaЛa, 0)=[[1, 3, 5, 7]]. OK" - WARNING: search term not found: "Л" ECHO: "Expect [[]] for search(Л, a🂡a🂡a🂡a🂡a, 0)=[[]]. OK" ECHO: "Expect [[2, 6]] for search(Л, a🂡Л🂡a🂡Л🂡a, 0)=[[2, 6]]. OK" ECHO: "----- Lookup of 4-byte into mixed multi-byte" - WARNING: search term not found: "🂡" ECHO: "Expect [] for search(🂡, aЛaЛaЛaЛa, 1)=[]. OK" ECHO: "Expect [1] for search(🂡, a🂡a🂡a🂡a🂡a, 1)=[1]. OK" - WARNING: search term not found: "🂡" ECHO: "Expect [[]] for search(🂡, aЛaЛaЛaЛa, 0)=[[]]. OK" ECHO: "Expect [[1, 3, 5, 7]] for search(🂡, a🂡a🂡a🂡a🂡a, 0)=[[1, 3, 5, 7]]. OK" ECHO: "Expect [[1, 3, 5, 7]] for search(🂡, a🂡Л🂡a🂡Л🂡a, 0)=[[1, 3, 5, 7]]. OK" ECHO: "----- Lookup of mixed multi-byte into mixed multi-byte" - WARNING: search term not found: "🂡" ECHO: "Expect [[0, 2, 4, 6, 8], [1, 3, 5, 7], []] for search(aЛ🂡, aЛaЛaЛaЛa, 0)=[[0, 2, 4, 6, 8], [1, 3, 5, 7], []]. OK" - WARNING: search term not found: "Л" ECHO: "Expect [[0, 2, 4, 6, 8], [], [1, 3, 5, 7]] for search(aЛ🂡, a🂡a🂡a🂡a🂡a, 0)=[[0, 2, 4, 6, 8], [], [1, 3, 5, 7]]. OK" ECHO: "Expect [[0, 4, 8], [2, 6], [1, 3, 5, 7]] for search(aЛ🂡, a🂡Л🂡a🂡Л🂡a, 0)=[[0, 4, 8], [2, 6], [1, 3, 5, 7]]. OK" ECHO: "Expect [[1, 3, 5, 7], [0, 4, 8], [2, 6]] for search(🂡aЛ, a🂡Л🂡a🂡Л🂡a, 0)=[[1, 3, 5, 7], [0, 4, 8], [2, 6]]. OK"