pike.git
/
src
/
testsuite.in
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/testsuite.in:11916:
// - is_absolute_path // Tested in lib // - kill // - load_module // - localtime ifefun(localtime,[[ test_true(mappingp(localtime(0)))
+
test_eq(localtime(1<<31)->year, 138)
+
test_eq(localtime(1<<32)->year, 206)
+
test_eq(localtime(1<<33)->year, 342)
+
test_equal(sort(indices(localtime(0))),({
+
"hour",
+
"isdst",
+
"mday",
+
"min",
+
"mon",
+
"sec",
+
"timezone",
+
"wday",
+
"yday",
+
"year"
+
}))
test_do([[int t = -1; catch(localtime(t));]]) ]]) cond([[all_constants()->localtime && all_constants()->mktime]], [[ test_any([[int x=time(); return mktime(localtime(x)) == x;]], 1) test_any([[int x=time(); for(int y=0;y<100;y++) if(mktime(localtime(x+y)) != x+y) return x+y; return 0;]], 0) ]]) // - log
pike.git/src/testsuite.in:12114:
"mon":3, "mday":26, "hour":1, "min":51, "timezone":0, ]) ) ]]) test_any([[foreach(({1075550400,94691300,220921700,347152100,473382500, 599612900,725843300,852073700,978304100,1104534500, 1230764900,1356995300,1483225700,1609456100,1735686500,
-
1861916900,1988147300,2114377700,1500033813
+
1861916900,1988147300,2114377700,1500033813
,
+
0,1,1<<31,1<<32,1<<33
}),int t) { int res = mktime (gmtime (t)); if(res!=t) return ({t, res}); } return 0;]], 0) test_eq(mktime (0, 0, 0, -200, -6, 101, 0, 0), 945043200); test_eq(mktime (0, 0, 0, -1, 2, 107, 0, 0), 1172534400); test_eq(mktime (0, 0, 0, 200, 1, 107, 0, 0), 1187481600); test_eq(mktime (200, 200, 200, 200, 1, 107, 0, 0), 1188213800);