1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

Sed the expected output instead of the output from sgml-parser

This commit is contained in:
Jonas Fonseca 2006-01-28 15:12:49 +01:00 committed by Jonas Fonseca
parent 03c467bcbf
commit c223f6ce94
3 changed files with 7 additions and 8 deletions

View File

@ -19,9 +19,9 @@ test_normalize_output_equals () {
URI="test:$(normalize "$desc")"
sgml-parser --src "$src" --normalize "$config" --uri "$URI" --src "$src" | sed 's/^ //' > output
sgml-parser --src "$src" --normalize "$config" --uri "$URI" --src "$src" > output
echo "#document: $URI" > expected
echo "$out" | sed -n '2,$p' >> expected
echo "$out" | sed -n '2,$p' | sed 's/^/ /' >> expected
test_expect_success "$desc" 'cmp output expected'
}

View File

@ -18,9 +18,9 @@ test_output_equals () {
URI="test:$(normalize "$desc")"
sgml-parser --uri "$URI" --src "$src" | sed 's/^ //' > output
sgml-parser --uri "$URI" --src "$src" > output
echo "#document: $URI" > expected
echo "$out" | sed -n '2,$p' >> expected
echo "$out" | sed -n '2,$p' | sed 's/^/ /' >> expected
test_expect_success "$desc" 'cmp output expected'
}

View File

@ -19,11 +19,10 @@ test_incremental_parsing () {
URI="test:$(normalize "$desc")"
echo "#document: $URI" > expected
echo "$out" | sed -n '2,$p' >> expected
echo "$out" | sed -n '2,$p' | sed -e 's/^/ /' >> expected
for size in 1 2 3 4 5 6 7 8 9 10 15 20 25 50; do
echo -n "$src" | sgml-parser --uri "$URI" --stdin "$size" \
| sed -e 's/^ //' > output
echo -n "$src" | sgml-parser --uri "$URI" --stdin "$size" > output
test_run_ 'cmp output expected'
if [ "$?" != 0 -o "$eval_ret" != 0 ]
@ -39,7 +38,7 @@ test_incremental_parsing () {
test_incremental_parsing \
"Parse a small document." \
'<html><body><p>Hello World!</p></body></html>' \
'
'
element: html
element: body
element: p