Usually we check out with Unix line endings, but if you don't set this
option, then get adds extra newlines to text files. Since there are
only three places, let's just fix them.
Fixes #2276
"asdf" [ [ 2 read ] throw-on-eof 3 read ] with-string-reader
] unit-test
-{ "as" "df\n" } [
+{ t } [
"vocab:io/streams/throwing/asdf.txt" utf8 [
[ 2 read ] throw-on-eof 20 read
] with-file-reader
+ ! For Windows line endings
+ 2array {
+ { "as" "df\n" }
+ { "as" "df\r\n" }
+ } member?
] unit-test
{ B{ 0 1 2 3 } B{ 0 1 2 3 } } [
{ $values { "path" "a pathname specifier" } { "checksum" "a checksum specifier" } { "value" byte-array } }
{ $description "Computes the checksum of all data in a file." }
{ $examples
- { $example
+ { $unchecked-example
+ ! This example fails on Windows if you ``git clone`` with Windows line-endings
+ ! Issue #2276
"USING: checksums checksums.crc32 prettyprint ;"
"\"resource:core/checksums/crc32/crc-me.txt\" crc32 checksum-file ."
"B{ 196 202 117 155 }"
"resource:extra/benchmark/regex-dna/regex-dna-test-in.txt"
[ regex-dna ] with-string-writer
"resource:extra/benchmark/regex-dna/regex-dna-test-out.txt"
- ascii file-contents =
+ ! Ensure the line endings don't change on Windows
+ ! when checking out with git.
+ ascii file-lines "\n" join =
] unit-test