Add notdir implementation

mk2rbc would already translate notdir calls,
but since there was no implementation it would
fail at runtime.

Bug: 201700692
Test: m rbcrun; rbcrun build/make/tests/run.rbc
Change-Id: Ie0f4e7b65448e612fa56f87b0bc138648cc0ad58
This commit is contained in:
Cole Faust
2021-11-15 14:26:14 -08:00
parent d1c2c4e1b8
commit 0cc94d3275
2 changed files with 14 additions and 1 deletions

View File

@@ -52,6 +52,11 @@ assert_eq(["from/a:to/a", "from/b:to/b"], rblf.product_copy_files_by_pattern("fr
assert_eq([], rblf.filter(["a", "", "b"], "f"))
assert_eq(["", "b"], rblf.filter_out(["a", "" ], ["a", "", "b"] ))
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"))
assert_eq("", rblf.notdir("/"))
assert_eq("", rblf.notdir(""))
(globals, config, globals_base) = rblf.product_configuration("test/device", init, version_defaults)
assert_eq(
{