Skip to content

Commit

Permalink
Add a test for the page 1252 encoding
Browse files Browse the repository at this point in the history
The previous patch added support for page 1252 encoding. Include a test
for it in our check script, using the page provided by the reporter at

  #15
  • Loading branch information
eafer committed Jan 26, 2021
1 parent 1a7b95a commit ec10091
Show file tree
Hide file tree
Showing 3 changed files with 3,255 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/check
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ $RDRVIEW --encoding="iso-8859-1" < "encodings/iso-8859-1.html" > "$OUT_NEW" || f
diff "$OUT_OLD" "$OUT_NEW" || fail "ISO-8859-1 not handled correctly when requested via cli"
$RDRVIEW -E iso-8859-1 < "encodings/iso-8859-1.html" > "$OUT_NEW" || fail "Failure for ISO-8859-1"
diff "$OUT_OLD" "$OUT_NEW" || fail "ISO-8859-1 not handled correctly when requested via cli"
# Also check that we handle Windows-1252
OUT_OLD="encodings/cp-1252.txt"
$RDRVIEW < "encodings/cp-1252.html" > "$OUT_NEW" || fail "Failure for Windows-1252"
diff "$OUT_OLD" "$OUT_NEW" || fail "Windows-1252 not handled correctly"

# Check that we fail cleanly when given an unknown encoding
echo '<html><body>A</body></html>' | $RDRVIEW -E hfi4iefh &>/dev/null
Expand Down
Loading

0 comments on commit ec10091

Please sign in to comment.