1 This patch fixes a failing unit test by feeding buildNormalizedPath to the
2 tzdata properly. Three other tests are disabled, one assumes /root and the
3 two others use networking. Not bad out of almost 700 tests!
5 by Pjotr Prins <pjotr.guix@thebird.nl>
7 --- a/std/datetime.d.orig 2016-11-24 01:13:52.584495545 +0100
8 +++ b/std/datetime.d 2016-11-24 01:17:09.655306728 +0100
9 @@ -28081,22 +28081,24 @@
10 import std.range : retro;
11 import std.format : format;
15 enforce(tzDatabaseDir.exists(), new DateTimeException(format("Directory %s does not exist.", tzDatabaseDir)));
16 enforce(tzDatabaseDir.isDir, new DateTimeException(format("%s is not a directory.", tzDatabaseDir)));
21 auto tzfileOffset = name in tzdataIndex(tzDatabaseDir);
22 enforce(tzfileOffset, new DateTimeException(format("The time zone %s is not listed.", name)));
23 string tzFilename = separate_index ? "zoneinfo.dat" : "tzdata";
24 immutable file = buildNormalizedPath(tzDatabaseDir, tzFilename);
27 - immutable file = buildNormalizedPath(tzDatabaseDir, name);
29 + auto filename = "./" ~ strip(name); // make sure the prefix is not stripped
30 + immutable file = buildNormalizedPath(tzDatabaseDir, filename);
33 - enforce(file.exists(), new DateTimeException(format("File %s does not exist.", file)));
34 + enforce(file.exists(), new DateTimeException(format("File %s does not exist in %s.", file, tzDatabaseDir)));
35 enforce(file.isFile, new DateTimeException(format("%s is not a file.", file)));
37 auto tzFile = File(file);
38 diff --git a/std/path.d b/std/path.d
39 index 254d8f0..b0fc04d 100644
42 @@ -3080,8 +3080,11 @@ unittest
46 + pragma(msg, "test disabled on GNU Guix");
48 assert(expandTilde("~root") == "/root", expandTilde("~root"));
49 assert(expandTilde("~root/") == "/root/", expandTilde("~root/"));
52 assert(expandTilde("~Idontexist/hey") == "~Idontexist/hey");
54 diff --git a/std/socket.d b/std/socket.d
55 index b85d1c9..7fbf346 100644
58 @@ -859,6 +862,8 @@ class InternetHost
62 + pragma(msg, "test disabled on GNU Guix");
64 InternetHost ih = new InternetHost;
66 ih.getHostByAddr(0x7F_00_00_01);
67 @@ -889,6 +894,7 @@ unittest
68 // writefln("aliases[%d] = %s", i, s);