Bug 11580 – A unittest of std.stdio.rawRead cannot run and some unittests in std.stdio must run on Win64.

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2013-11-22T05:06:12Z
Last change time
2018-10-16T18:43:45Z
Assigned to
No Owner
Creator
Kazuki Komatsu

Comments

Comment #0 by enjouzensyou.boinc — 2013-11-22T05:06:12Z
Following code cannot run in Win64. --------------- import std.stdio; import std.file; void main() { auto deleteme = "foo.txt"; std.file.write(deleteme, "\r\n\n\r\n"); scope(exit) std.file.remove(deleteme); auto f = File(deleteme, "r"); auto buf = f.rawRead(new char[5]); f.close(); assert(buf == "\r\n\n\r\n"); } --------------- And furthermore, some unittest of std.stdio is nullified by using `version(Win64){}else` in Win64. For example: GitHub HEAD's std/stdio.d(605) --------------- version(Win64) {} else unittest { auto deleteme = testFilename(); auto f = File(deleteme, "w"); scope(exit) std.file.remove(deleteme); f.rawWrite("\r\n\n\r\n"); f.close(); assert(std.file.read(deleteme) == "\r\n\n\r\n"); } ---------------
Comment #1 by n8sh.secondary — 2018-10-16T18:43:45Z
Currently working for me on Win64. The unittest is also no longer disabled on Win64.