Remove regex functionality from rbcrun

As a first step to making .rbc files compatible with bazel,
remove regex support since bazel doesn't have it.

Fixes: 227384703
Test: ./out/rbcrun ./build/make/tests/run.rbc
Change-Id: I8b946c20cc42897a47a5516a167732f4e16b6158
This commit is contained in:
Cole Faust
2022-03-29 15:48:45 -07:00
parent d3a9957616
commit 62878a2cef
5 changed files with 40 additions and 57 deletions

View File

@@ -53,7 +53,11 @@ assert_eq(["foo/%"], rblf.mkpatsubst("%", "%/%", ["foo"]))
assert_eq(["from/a:to/a", "from/b:to/b"], rblf.product_copy_files_by_pattern("from/%", "to/%", "a b"))
assert_eq([], rblf.filter(["a", "", "b"], "f"))
assert_eq(["", "b"], rblf.filter_out(["a", "" ], ["a", "", "b"] ))
assert_eq(["ab%c", "axyzb%c"], rblf.filter(["a%b%c"], ["ab%c", "axyzb%c", "axyzb%cd", "axyzbwc"]))
assert_eq(["abc", "bcd"], rblf.filter(["a%", "b%"], ["abc", "def", "bcd", "xabc"]))
assert_eq(["b", "ab"], rblf.filter_out(["a", "" ], ["a", "", "b", "ab"]))
assert_eq(["c"], rblf.filter_out(["a", "b" ], ["a", "b", "c"]))
assert_eq(["c"], rblf.filter_out(["a%", "b" ], ["abc", "b", "c"]))
assert_eq("foo.c no_folder", rblf.notdir(["src/foo.c", "no_folder"]))
assert_eq("foo.c no_folder", rblf.notdir("src/foo.c no_folder"))