@@ -13,22 +13,22 @@ all: normal custom missing broken sysroot sysroot-invalid sysroot-missing
1313
1414# Check that the test works normally, using the built-in fallback bundle.
1515normal : test.rs
16- $(RUSTC ) $< 2>&1 | grep " struct literal body without path"
16+ $(RUSTC ) $< 2>&1 | $( CGREP ) " struct literal body without path"
1717
1818# Check that a primary bundle can be loaded and will be preferentially used
1919# where possible.
2020custom : test.rs working.ftl
21- $(RUSTC ) $< -Ztranslate-additional-ftl=$(CURDIR ) /working.ftl 2>&1 | grep " this is a test message"
21+ $(RUSTC ) $< -Ztranslate-additional-ftl=$(CURDIR ) /working.ftl 2>&1 | $( CGREP ) " this is a test message"
2222
2323# Check that a primary bundle with a broken message (e.g. a interpolated
2424# variable is missing) will use the fallback bundle.
2525missing : test.rs missing.ftl
26- $(RUSTC ) $< -Ztranslate-additional-ftl=$(CURDIR ) /missing.ftl 2>&1 | grep " struct literal body without path"
26+ $(RUSTC ) $< -Ztranslate-additional-ftl=$(CURDIR ) /missing.ftl 2>&1 | $( CGREP ) " struct literal body without path"
2727
2828# Check that a primary bundle without the desired message will use the fallback
2929# bundle.
3030broken : test.rs broken.ftl
31- $(RUSTC ) $< -Ztranslate-additional-ftl=$(CURDIR ) /broken.ftl 2>&1 | grep " struct literal body without path"
31+ $(RUSTC ) $< -Ztranslate-additional-ftl=$(CURDIR ) /broken.ftl 2>&1 | $( CGREP ) " struct literal body without path"
3232
3333# Check that a locale can be loaded from the sysroot given a language
3434# identifier by making a local copy of the sysroot and adding the custom locale
@@ -48,13 +48,13 @@ sysroot: test.rs working.ftl
4848 ln -s $(SYSROOT ) /lib/rustlib/src/* $(FAKEROOT ) /lib/rustlib/src
4949 mkdir -p $(FAKEROOT ) /share/locale/zh-CN/
5050 ln -s $(CURDIR ) /working.ftl $(FAKEROOT ) /share/locale/zh-CN/basic-translation.ftl
51- $(RUSTC ) $< --sysroot $(FAKEROOT ) -Ztranslate-lang=zh-CN 2>&1 | grep " this is a test message"
51+ $(RUSTC ) $< --sysroot $(FAKEROOT ) -Ztranslate-lang=zh-CN 2>&1 | $( CGREP ) " this is a test message"
5252
5353# Check that the compiler errors out when the sysroot requested cannot be
5454# found. This test might start failing if there actually exists a Klingon
5555# translation of rustc's error messages.
56- sysroot-missing :
57- $(RUSTC ) $< -Ztranslate-lang=tlh 2>&1 | grep " missing locale directory"
56+ sysroot-missing :
57+ $(RUSTC ) $< -Ztranslate-lang=tlh 2>&1 | $( CGREP ) " missing locale directory"
5858
5959# Check that the compiler errors out when the directory for the locale in the
6060# sysroot is actually a file.
@@ -73,4 +73,4 @@ sysroot-invalid: test.rs working.ftl
7373 ln -s $(SYSROOT ) /lib/rustlib/src/* $(FAKEROOT ) /lib/rustlib/src
7474 mkdir -p $(FAKEROOT ) /share/locale
7575 touch $(FAKEROOT ) /share/locale/zh-CN
76- $(RUSTC ) $< --sysroot $(FAKEROOT ) -Ztranslate-lang=zh-CN 2>&1 | grep " ` \$ sysroot/share/locales/\$ locale` is not a directory"
76+ $(RUSTC ) $< --sysroot $(FAKEROOT ) -Ztranslate-lang=zh-CN 2>&1 | $( CGREP ) " ` \$ sysroot/share/locales/\$ locale` is not a directory"
0 commit comments