-
-
Notifications
You must be signed in to change notification settings - Fork 666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unicode sys tests and fixes #8135
Unicode sys tests and fixes #8135
Conversation
|
Also, a windows script for unicode filenames generation is needed. |
Yup, I only listed the methods for
I might port it yet, although the idea was partly to generate the test suite and commit the resulting files and directories to git. |
Given there's not much fixes to do I'm putting that in Release 4.0 to monitor the changes. In case we have some very target specific issue yet unresolved we will still not block final release because of this. |
c9e1679
to
aa2fe60
Compare
So the non-Windows part of this is basically done. The various target failures should be covered by the "Issues / PRs spawned" list. I am not sure how to proceed with Windows support here (cc @andyli): The last commit attempted to simply commit the test suite directory with its Unicode-named files and sub-directories. But AppVeyor fails to even I also tried to put the Porting |
7z is pre-installed in AppVeyor: https://www.appveyor.com/docs/windows-images-software/#tools You can also use whatever program that can correctly handle Unicode file names correctly (e.g. Python?). One tip about working with AppVeyor: You can remote desktop into the build and do whatever testing/debugging there. Just make sure you're not doing it in the HF repo, but use a fork of your own, to prevent other people connect into it and print out our secret variables (those wouldn't be available in fork builds). |
I have merged the HL PR and restarted the build to update results. |
Uhm, something is weird there then, how and why were the tests were broken?
…On Tue, Apr 30, 2019 at 3:57 PM Aurel ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In std/haxe/io/Path.hx
<#8135 (comment)>:
> @@ -230,8 +230,13 @@ class Path {
var acc = new StringBuf();
var colon = false;
var slashes = false;
+ #if hl
It was (in bba3863
<bba3863>),
but that broke the Java tests.
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#8135 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAHZXQE6JBZCL3QM322L3VLPTBF5BANCNFSM4HEWZOGQ>
.
|
Here are the failing tests: https://travis-ci.org/HaxeFoundation/haxe/jobs/524618714#L3553 I didn't investigate why they failed, but you are right, it really should work on Java. Interestingly enough, the failures are e.g. expected I'll investigate if there is a problem with the iterator on Java tomorrow. I'm also wondering why it even works as-is on Java. |
Ok, fixed that with #8239. |
9b12833
to
7913b5f
Compare
7913b5f
to
d98e310
Compare
It would be best if somebody with a working Haxe setup on Windows looked into this. It is difficult for me to debug the targets from AppVeyor results. Update: I got a Vagrant set up with Windows 10 that mostly works, so hopefully I can progress on this again. |
78c692e
to
f68fc31
Compare
f68fc31
to
2cdedee
Compare
d40dae2
to
34d4435
Compare
Travis failure is unrelated ( |
Closes #8094.
General
define(extracted into a separate PR target.unicode define #8244)target.unicode
- true by default, false on Neko or with(cpp && !cppia && !hxcpp_smart_strings)
Test setup
compatibility equivalent characters?(out of scope)Filesystem
Sys
setCwd
,getCwd
(cd into Uni directory, read back path)this does not work over symlinks – we could copy binaries into Uni directories and run them there, but this is problematic to cover for all targets;programPath
(symlink in a Uni directory, read back path)getCwd
should mostly cover this anywaysys.FileSystem
absolutePath
(aftersetCwd
, nested)exists
fullPath
(with symlinks in Uni directories)isDirectory
readDirectory
(test dir + nested Uni directories)stat
rename
deleteFile
deleteDirectory
createDirectory
sys.io.File
copy
(this should probably be insys.FileSystem
)haxe.io.Path
I/O API
Read from a known source. Write to a temporary file and compare on
Bytes
against a known correct output.trace
sys.io.File
getBytes
getContent
read
(+haxe.io.Input
test)saveContent
update
,write
,append
(+haxe.io.Output
test)haxe.io.Input
readLine
readString
readUntil
haxe.io.Output
writeString
Sys
stdin
,stderr
,stdout
print
,println
(not Unicode related)getChar
Environment-related API
Sys
args
environment
getEnv
,putEnv
Process API
Sys
command
- Uni executable, Uni argumentssys.io.Process
new
stdin
,stderr
,stdout
Miscellaneous
TestUnicode
genTestRes.sh
Windows portcommit test suite to gitjust use Pythonsome common scaffolding for running process of the same platform (currently inTestUnicode
as well asTestCommandBase
)replaceExitCode
withUtilityProcess
Check targets
Issues / PRs spawned
trace
,Sys.print
,Sys.println
,String.split
, UTF-8 decoding OOB Unicode fixes hxcpp#781Utf8.iter
(in native code) throws for\x7F
Utf.iter8 throws for 0x7F on Neko #8139Input.readString should be in characters #8199 (bytes it is!)Input.readString
should read read N charactersStringTools.endsWith
fails on Unicode strings [php] StringTools.endsWith fails with Unicode #8211Bytes.getString
with non-BMP sequences [php] haxe.io.Bytes.getString issues #8212haxe.io.Path
usesStringTools.fastCodeAt
without handling surrogates (fix is part of this PR)Sys.args
does not decode UTF-8 arguments correctly Sys.args with unicode hxcpp#783Output.writeString
writes bytes individually as codepoints Output.writeString issue with Unicode strings on Python #8197Sys.stdin().readLine()
fails on Unicode input [python] Fix #8373 #8374Sys.println()
should append\r\n
on Windows (fix is part of this PR)trace
defaults tocp1252
on Windows when piped (fix is part of this PR)Sys.stdout
may not default to UTF-8 on Windows (fix is part of this PR)FileSystem.fullPath
does not resolve symlinks [cs,lua] FileSystem.fullPath does not resolve symlinks #8215FileSystem.readDirectory
reports bad encoding [cs] readDirectory bad encoding #8247Sys.environment
segfault [lua] Sys.environment segfault #8216Sys.print
duplicates CR on Windows Sys.print duplicates CR on Windows #8379Sys.setCwd
,.deleteFile
,.deleteDirectory
,FileSystem.exists
,.rename
fail on Unicode path [cpp] Sys.setCwd, .deleteFile, .deleteDirectory, FileSystem.exists, .rename fail on Unicode path #8400