Skip to content

Commit

Permalink
Document the assumptions in translate-nl test
Browse files Browse the repository at this point in the history
  • Loading branch information
zoffixznet committed Aug 8, 2018
1 parent d422889 commit 67d6f94
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions S32-str/encode.t
Expand Up @@ -15,6 +15,10 @@ is "a\nb".encode('utf8').elems, 3, 'right length of Buf with \n';
if $*DISTRO.is-win {
is-deeply "a\nb".encode('utf8', :translate-nl), utf8.new(97,0x0d,0x0a,98), 'Translation of \n in Windows environment';
} else {
# Note: this test assumes all OSes it will run on use U+000A as newlines.
# Should in the future an OS that uses different line endings be
# supported by the language, this test should be modified to look
# for that OS's native line endings in the string.
is-deeply "a\nb".encode('utf8', :translate-nl), utf8.new(97,0x0a,98), 'Non-translation of \n outside Windows';
}

Expand Down

0 comments on commit 67d6f94

Please sign in to comment.