1#!/bin/bash 2 3#testing "name" "command" "result" "infile" "stdin" 4 5testcmd 'simple' '' 'a\nb\nc\nd\n' '' 'a b b c c d\n' 6testcmd 'reversed' '' 'a\nb\nc\nd\n' '' 'c d b c a b' 7testcmd '2 pass duplicate killing' '' 'c\nf\na\n' '' 'f a c f' 8testcmd 'detect cycle' '>/dev/null 2>/dev/null || echo yes' 'yes\n' '' 'a b b a' 9