mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Drop unnneeded URL argument and simplify test helpers
This commit is contained in:
parent
f1c3c90a4f
commit
a1e5122183
@ -15,15 +15,7 @@ test_expect_incomplete () {
|
||||
desc="$1"; shift
|
||||
src="$1"; shift
|
||||
|
||||
URI="test:$(echo "$desc" | sed '
|
||||
s/^[ \t]*\[[^]]*\][ \t]*//;
|
||||
s/[:., \t][:., \t]*/-/g;
|
||||
s/_/-/g;
|
||||
# *cough*
|
||||
y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/;
|
||||
s/[^a-zA-Z0-9-]//g;')"
|
||||
|
||||
sgml-parser --uri "$URI" --src "$src" --incomplete >/dev/null
|
||||
sgml-parser --src "$src" --incomplete >/dev/null
|
||||
test_expect_success "$desc" \
|
||||
"test $? = 1"
|
||||
}
|
||||
|
@ -16,15 +16,7 @@ test_output_line_numbers () {
|
||||
src="$1"; shift
|
||||
expected_lines="$1"; shift
|
||||
|
||||
URI="test:$(echo "$desc" | sed '
|
||||
s/^[ \t]*\[[^]]*\][ \t]*//;
|
||||
s/[:., \t][:., \t]*/-/g;
|
||||
s/_/-/g;
|
||||
# *cough*
|
||||
y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/;
|
||||
s/[^a-zA-Z0-9-]//g;')"
|
||||
|
||||
lines=$(sgml-parser --uri "$URI" --src "$src" --print-lines)
|
||||
lines=$(sgml-parser --src "$src" --print-lines)
|
||||
|
||||
test_expect_success "$desc" "test $lines = $expected_lines"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user