@@ -13,22 +13,22 @@ all: normal custom missing broken sysroot sysroot-invalid sysroot-missing
13
13
14
14
# Check that the test works normally, using the built-in fallback bundle.
15
15
normal : test.rs
16
- $(RUSTC ) $< 2>&1 | grep " struct literal body without path"
16
+ $(RUSTC ) $< 2>&1 | $( CGREP ) " struct literal body without path"
17
17
18
18
# Check that a primary bundle can be loaded and will be preferentially used
19
19
# where possible.
20
20
custom : 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"
22
22
23
23
# Check that a primary bundle with a broken message (e.g. a interpolated
24
24
# variable is missing) will use the fallback bundle.
25
25
missing : 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"
27
27
28
28
# Check that a primary bundle without the desired message will use the fallback
29
29
# bundle.
30
30
broken : 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"
32
32
33
33
# Check that a locale can be loaded from the sysroot given a language
34
34
# identifier by making a local copy of the sysroot and adding the custom locale
@@ -48,13 +48,13 @@ sysroot: test.rs working.ftl
48
48
ln -s $(SYSROOT ) /lib/rustlib/src/* $(FAKEROOT ) /lib/rustlib/src
49
49
mkdir -p $(FAKEROOT ) /share/locale/zh-CN/
50
50
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"
52
52
53
53
# Check that the compiler errors out when the sysroot requested cannot be
54
54
# found. This test might start failing if there actually exists a Klingon
55
55
# 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"
58
58
59
59
# Check that the compiler errors out when the directory for the locale in the
60
60
# sysroot is actually a file.
@@ -73,4 +73,4 @@ sysroot-invalid: test.rs working.ftl
73
73
ln -s $(SYSROOT ) /lib/rustlib/src/* $(FAKEROOT ) /lib/rustlib/src
74
74
mkdir -p $(FAKEROOT ) /share/locale
75
75
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