#!/bin/bash [ -f testing.sh ] && . testing.sh echo "hello world " > en.txt echo "this is some text " >> en.txt # https://en.wikipedia.org/wiki/Aegukga echo "ë™í•´ë¬¼ê³¼ ë°±ë‘ì‚°ì´ ë§ˆë¥´ê³ ë‹³ë„ë¡" > kr.txt echo "í•˜ë‚˜ë‹˜ì´ ë³´ìš°í•˜ì‚¬ ìš°ë¦¬ë‚˜ë¼ ë§Œì„¸." >> kr.txt #testing "name" "command" "result" "infile" "stdin" testing "join" "fmt en.txt" "hello world this is some text\n" "" "" testing "split" "fmt -w 10 en.txt" "hello\nworld\nthis is\nsome text\n" "" "" testing "no room" "echo 'hello world' | fmt -w 1" "hello\nworld\n" "" "" testing "blank line" "echo -e 'first paragraph of text\n\nand another' | fmt -w 10" "first\nparagraph\nof text\n\nand\nanother\n" "" "" testing "ws-only line" "echo -e 'hello\n \nworld' | fmt -w 10" "hello\n\nworld\n" "" "" testing "leading space" "echo ' hello world' | fmt -w 5" " hello\n world\n" "" "" testing "utf8" "fmt -w 10 kr.txt" "ë™í•´ë¬¼ê³¼\në°±ë‘ì‚°ì´\në§ˆë¥´ê³ \n닳ë„ë¡\n하나님ì´\n보우하사\n우리나ë¼\n만세.\n" "" "" testing "no newline" "fmt -w 10" "and\nthisisaverylongline\n" \ "" "and thisisaverylongline" testing "" "fmt -w 9" "1 2 3 4\n5 6 7 8\n9 0\n" "" "1 2 3 4 5 6 7 8 9 0\n" testing "" "fmt -w 10" "1 2 3 4 5\n6 7 8 9 0\n" "" "1 2 3 4 5 6 7 8 9 0\n" testing "" "fmt -w 11" "1 2 3 4 5\n6 7 8 9 0\n" "" "1 2 3 4 5 6 7 8 9 0\n" testing "" "fmt -w 12" "1 2 3 4 5 6\n7 8 9 0\n" "" "1 2 3 4 5 6 7 8 9 0\n" testing "matched tab indent" "fmt" "\thello world\n" "" "\thello\n\tworld" testing "matched tab/space" "fmt" ' hello world\n' "" \ " hello\n\tworld" testing "matched space/tab" "fmt" "\thello world\n" "" "\thello\n world" rm en.txt kr.txt