summaryrefslogtreecommitdiffstats
path: root/src/test/run-make-fulldeps/cat-and-grep-sanity-check/Makefile
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
commit698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch)
tree173a775858bd501c378080a10dca74132f05bc50 /src/test/run-make-fulldeps/cat-and-grep-sanity-check/Makefile
parentInitial commit. (diff)
downloadrustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz
rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/run-make-fulldeps/cat-and-grep-sanity-check/Makefile')
-rw-r--r--src/test/run-make-fulldeps/cat-and-grep-sanity-check/Makefile46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/test/run-make-fulldeps/cat-and-grep-sanity-check/Makefile b/src/test/run-make-fulldeps/cat-and-grep-sanity-check/Makefile
new file mode 100644
index 000000000..fead197ce
--- /dev/null
+++ b/src/test/run-make-fulldeps/cat-and-grep-sanity-check/Makefile
@@ -0,0 +1,46 @@
+-include ../tools.mk
+
+all:
+ echo a | $(CGREP) a
+ ! echo b | $(CGREP) a
+ echo xyz | $(CGREP) x y z
+ ! echo abc | $(CGREP) b c d
+ printf "x\ny\nz" | $(CGREP) x y z
+
+ echo AbCd | $(CGREP) -i a b C D
+ ! echo AbCd | $(CGREP) a b C D
+
+ true | $(CGREP) -v nothing
+ ! echo nothing | $(CGREP) -v nothing
+ ! echo xyz | $(CGREP) -v w x y
+ ! echo xyz | $(CGREP) -v x y z
+ echo xyz | $(CGREP) -v a b c
+
+ ! echo 'foo bar baz' | $(CGREP) 'foo baz'
+ echo 'foo bar baz' | $(CGREP) foo baz
+ echo 'x a `b` c y z' | $(CGREP) 'a `b` c'
+
+ echo baaac | $(CGREP) -e 'ba*c'
+ echo bc | $(CGREP) -e 'ba*c'
+ ! echo aaac | $(CGREP) -e 'ba*c'
+
+ echo aaa | $(CGREP) -e 'a+'
+ ! echo bbb | $(CGREP) -e 'a+'
+
+ echo abc | $(CGREP) -e 'a|e|i|o|u'
+ ! echo fgh | $(CGREP) -e 'a|e|i|o|u'
+ echo abc | $(CGREP) -e '[aeiou]'
+ ! echo fgh | $(CGREP) -e '[aeiou]'
+ ! echo abc | $(CGREP) -e '[^aeiou]{3}'
+ echo fgh | $(CGREP) -e '[^aeiou]{3}'
+ echo ab cd ef gh | $(CGREP) -e '\bcd\b'
+ ! echo abcdefgh | $(CGREP) -e '\bcd\b'
+ echo xyz | $(CGREP) -e '...'
+ ! echo xy | $(CGREP) -e '...'
+ ! echo xyz | $(CGREP) -e '\.\.\.'
+ echo ... | $(CGREP) -e '\.\.\.'
+
+ echo foo bar baz | $(CGREP) -e 'foo.*baz'
+ ! echo foo bar baz | $(CGREP) -ve 'foo.*baz'
+ ! echo foo bar baz | $(CGREP) -e 'baz.*foo'
+ echo foo bar baz | $(CGREP) -ve 'baz.*foo'