Skip to content

Commit 2fd5048

Browse files
committed
Added prospective test for encoding conflict errors
1 parent 63941f9 commit 2fd5048

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/test_wayback_machine_downloader.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,14 @@ def test_file_list_exclude_filter_with_a_regex
8989
@wayback_machine_downloader.all = true
9090
assert_equal 69, @wayback_machine_downloader.get_file_list_curated.size
9191
end
92+
93+
# Testing encoding conflicts needs a different base_url
94+
def test_nonascii_suburls_download
95+
@wayback_machine_downloader = WaybackMachineDownloader.new base_url: 'https://en.wikipedia.org/wiki/%C3%84'
96+
# Once for the downloading...
97+
@wayback_machine_downloader.download_files
98+
# ... and once for the "is already present"
99+
@wayback_machine_downloader.download_files
100+
end
92101

93102
end

0 commit comments

Comments
 (0)