File: 11format.t

package info (click to toggle)
sombok 2.4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, forky, sid, trixie
  • size: 4,520 kB
  • sloc: ansic: 38,009; sh: 3,059; perl: 769; makefile: 134
file content (36 lines) | stat: -rwxr-xr-x 595 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#! /bin/sh

. tests/lb.sh

plan 6

for lang in fr ja; do
    ./sombok $OPTIONS --format-func '
	( case "$1" in
	sot | sop | sol)
	    echo -n "    $1>"
	    cat
	    ;;
	eol | eop | eot)
	    echo "<$1"
	    ;;
	*)
	    cat
	    ;;
	esac ) | dd 2>/dev/null' \
	-o tmp.out test-data/$lang.in
    cmp tmp.out test-data/$lang.format.out
    if [ "$?" = "0" ]; then
	SUCCESS=`expr $SUCCESS + 1`
    fi
    rm -f tmp.out
done
for lang in fr ko; do
    dotest $lang "$lang.newline" --format-func NEWLINE
done
for lang in fr ko; do
    dotest $lang $lang.newline --format-func TRIM
done

check_result