]> gitweb.michael.orlitzky.com - hath.git/blob - test/shell/manpage-sort.test
hath.cabal: bump to v0.5.1.
[hath.git] / test / shell / manpage-sort.test
1 # Test --sort example from the man page.
2
3 # The default pipe-to-sort doesn't work.
4 echo "10.0.121.32/28 10.0.93.248/29" | dist/build/hath/hath reduced | sort
5 >>>
6 10.0.121.32/28
7 10.0.93.248/29
8 >>>= 0
9
10 # Neither does a numeric sort.
11 echo "10.0.121.32/28 10.0.93.248/29" | dist/build/hath/hath reduced | sort -n
12 >>>
13 10.0.121.32/28
14 10.0.93.248/29
15 >>>= 0
16
17 # But the CIDR sort order does.
18 echo "10.0.121.32/28 10.0.93.248/29" | dist/build/hath/hath reduced --sort
19 >>>
20 10.0.93.248/29
21 10.0.121.32/28
22 >>>= 0