Parse variable references with #s
Inside a variable reference, a # does not start
a comment.
Fixes: 218742602
Test: go test
Change-Id: I16cf04c74a8aa30482fd9293175f893e4efb60f1
diff --git a/mk2rbc/mk2rbc_test.go b/mk2rbc/mk2rbc_test.go
index 4084660..f60cd6e 100644
--- a/mk2rbc/mk2rbc_test.go
+++ b/mk2rbc/mk2rbc_test.go
@@ -254,6 +254,8 @@
in: `
$(warning this is the warning)
$(warning)
+$(warning # this warning starts with a pound)
+$(warning this warning has a # in the middle)
$(info this is the info)
$(error this is the error)
PRODUCT_NAME:=$(shell echo *)
@@ -264,6 +266,8 @@
cfg = rblf.cfg(handle)
rblf.mkwarning("product.mk", "this is the warning")
rblf.mkwarning("product.mk", "")
+ rblf.mkwarning("product.mk", "# this warning starts with a pound")
+ rblf.mkwarning("product.mk", "this warning has a # in the middle")
rblf.mkinfo("product.mk", "this is the info")
rblf.mkerror("product.mk", "this is the error")
cfg["PRODUCT_NAME"] = rblf.shell("echo *")