uniq_posix.t (743B)
- #!/usr/bin/env cram
- # SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
- # SPDX-License-Identifier: MPL-2.0
- $ export PATH="$TESTDIR/../cmd:$PATH"
- $ test "$(command -v uniq)" = "$TESTDIR/../cmd/uniq"
- $ uniq -c -f 1 "${TESTDIR}/uniq_0I.txt"
- \s*1 #01 foo0 bar0 foo1 bar1 (re)
- \s*1 #02 bar0 foo1 bar1 foo1 (re)
- \s*1 #03 foo0 bar0 foo1 bar1 (re)
- \s*1 #04 (re)
- \s*2 #05 foo0 bar0 foo1 bar1 (re)
- \s*1 #07 bar0 foo1 bar1 foo0 (re)
- $ uniq -d -f 1 "${TESTDIR}/uniq_0I.txt"
- #05 foo0 bar0 foo1 bar1
- $ uniq -u -f 1 "${TESTDIR}/uniq_0I.txt"
- #01 foo0 bar0 foo1 bar1
- #02 bar0 foo1 bar1 foo1
- #03 foo0 bar0 foo1 bar1
- #04
- #07 bar0 foo1 bar1 foo0
- $ uniq -d -s 2 "${TESTDIR}/uniq_0I.txt"