From 97131ac02e7863839098bf2adac578f9cb9d53cd Mon Sep 17 00:00:00 2001 From: Davy Landman Date: Tue, 16 Jul 2024 11:31:06 +0200 Subject: [PATCH] Added more tests for squeeze --- .../rascalmpl/library/lang/rascal/tests/basic/Strings1.rsc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/org/rascalmpl/library/lang/rascal/tests/basic/Strings1.rsc b/src/org/rascalmpl/library/lang/rascal/tests/basic/Strings1.rsc index 16e8eddbeac..9dddc90cbb2 100644 --- a/src/org/rascalmpl/library/lang/rascal/tests/basic/Strings1.rsc +++ b/src/org/rascalmpl/library/lang/rascal/tests/basic/Strings1.rsc @@ -259,6 +259,11 @@ test bool tstSqueeze3(str S) { } test bool tstSqueezeUnicode() = squeeze("Hi ๐Ÿ๐ŸWorld", "๐Ÿ") == "Hi ๐ŸWorld"; +test bool tstSqueezeCase1() = squeeze("abc", "a-c") == "abc"; +test bool tstSqueezeCase2() = squeeze("aabc", "a-c") == "abc"; +test bool tstSqueezeCase3() = squeeze("aabcc", "a-c") == "abc"; +test bool tstSqueezeCase4() = squeeze("aabbcc", "a-c") == "abc"; +test bool tstSqueezeCase5() = squeeze("aaabc", "a-c") == "abc"; test bool tstStartsWith(str S1, str S2) = startsWith(S1+S2, S1);