]> gitweb.factorcode.org Git - factor.git/commitdiff
formatting: Add some unit tests for what strftime thinks is right.
authorDoug Coleman <doug.coleman@gmail.com>
Sat, 7 Nov 2020 01:12:30 +0000 (19:12 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Sat, 7 Nov 2020 01:12:30 +0000 (19:12 -0600)
basis/formatting/formatting-tests.factor

index 96666a4594eac209a19bb381a221c10346cc7552..b8a95c7888ccca70c5152e0f1febe0a2d3859e72 100644 (file)
@@ -172,3 +172,9 @@ ${ os windows? "3" "2" ? } [ 5/2 "%.0f" sprintf ] unit-test
 ${ os windows? "2.500000e+00" "2e+00" ? } [ 5/2 "%.0e" sprintf ] unit-test
 ${ os windows? "3.500000e+00" "4e+00" ? } [ 7/2 "%.0e" sprintf ] unit-test
 ${ os windows? "1.000000e+00" "1e+00" ? } [ 1.0 "%.0e" sprintf ] unit-test
+
+{ "00" } [ 2020 1 1 <date> "%U" strftime ] unit-test
+{ "00" } [ 2020 1 1 <date> "%W" strftime ] unit-test
+
+{ "44" } [ 2020 11 6 <date> "%U" strftime ] unit-test
+{ "44" } [ 2020 11 6 <date> "%W" strftime ] unit-test