Un traducteur md -> html minimal en awk - retour accueil
git clone git://bebou.netlib.re/katdown
Log | Files | Refs | README |
launch-tests (778B)
1 #! /bin/sh 2 3 _die() { printf "$red$*$norm\n" >&2 ; } 4 _success() { printf "$green$*$norm\n" >&2; } 5 _inform() { printf "$blue$*$norm" >&2; } 6 red="\033[91m";green="\033[92m";blue="\033[94m";norm="\033[0m" 7 8 mkdir -p tests 9 10 < README lowdown --out-no-smarty | lynx -stdin -dump > tests/res-lowdown 11 < README cmark | lynx -stdin -dump > tests/res-cmark 12 13 for parser in gawk mawk one-true-awk "busybox awk" "gawk --posix" "gawk --traditional";do 14 < ./katdown sed "1d" > tests/no-shebang-katdown; 15 _inform "testing katdown with $parser\n" 16 17 < README $parser -f tests/no-shebang-katdown | 18 lynx -stdin -dump > tests/res-katdown 19 20 for trad in lowdown cmark;do 21 _inform " testing $trad " 22 if diff -u tests/res-katdown tests/res-$trad;then _success same 23 else _die not same; fi 24 done 25 done