[Issue 11580] New: A unittest of std.stdio.rawRead cannot run and some unittests in std.stdio must run on Win64.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Nov 22 05:06:13 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=11580

           Summary: A unittest of std.stdio.rawRead cannot run and some
                    unittests in std.stdio must run on Win64.
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: enjouzensyou.boinc at gmail.com


--- Comment #0 from Kazuki Komatsu <enjouzensyou.boinc at gmail.com> 2013-11-22 05:06:12 PST ---
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");
    }
---------------

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list