]> gitweb.michael.orlitzky.com - hath.git/blob - test/shell/manpage-barriers.test
hath.cabal: bump to v0.5.1.
[hath.git] / test / shell / manpage-barriers.test
1 # Test the --barriers examples from the manpage.
2
3 # The first one matches a line it probably shouldn't.
4 echo 127.0.0.100 | grep -P $(echo 127.0.0.1/32 | dist/build/hath/hath)
5 >>>
6 127.0.0.100
7 >>>= 0
8
9 # This one uses --barriers, and doesn't match that same line.
10 echo 127.0.0.100 | grep -P $(echo 127.0.0.1/32 | dist/build/hath/hath -b)
11 >>>
12 >>>= 1
13
14 # But, using barriers makes the regexp match something it shouldn't.
15 echo x127.0.0.1x | grep -Po $(echo 127.0.0.1/32 | dist/build/hath/hath -b)
16 >>>
17 x127.0.0.1x
18 >>>= 0