Kaynağa Gözat

iso_date(): test with a regex instead of specific string

This varies with timezone, and for reasons that now escape me, I had it
hardcoded to US Mountain time.
Brennen Bearnes 2 ay önce
ebeveyn
işleme
83a484492b
3 değiştirilmiş dosya ile 12 ekleme ve 7 silme
  1. 8
    4
      Changes
  2. 1
    1
      lib/App/WRT.pm
  3. 3
    2
      t/wrt_date.t

+ 8
- 4
Changes Dosyayı Görüntüle

@@ -1,11 +1,15 @@
1 1
 Revision history for App::WRT
2 2
 
3
+v6.3.0 2019-06-23
4
+
5
+  - Generalize iso_date() test for epoch to include all timezones
6
+
3 7
 v6.3.0 2019-06-22
4 8
 
5
-  - move get_date() from App::WRT::Util to App::WRT::Date
6
-  - make App::WRT::FileIO and ::Util less redundant
7
-  - add App::WRT::Mock::FileIO for faking writes in tests
8
-  - make bin/wrt-render-all testable, add t/bin-wrt-render-all.t
9
+  - Move get_date() from App::WRT::Util to App::WRT::Date
10
+  - Make App::WRT::FileIO and ::Util less redundant
11
+  - Add App::WRT::Mock::FileIO for faking writes in tests
12
+  - Make bin/wrt-render-all testable, add t/bin-wrt-render-all.t
9 13
 
10 14
 v6.2.4 2019-05-28
11 15
 

+ 1
- 1
lib/App/WRT.pm Dosyayı Görüntüle

@@ -16,7 +16,7 @@ package App::WRT;
16 16
 # without overthinking a bunch of hair-splitting decisions and categories,
17 17
 # but whatever.  I'll try to follow it, roughly.
18 18
 
19
-use version; our $VERSION = version->declare("v6.3.0");
19
+use version; our $VERSION = version->declare("v6.3.1");
20 20
 
21 21
 use strict;
22 22
 use warnings;

+ 3
- 2
t/wrt_date.t Dosyayı Görüntüle

@@ -14,9 +14,10 @@ ok(
14 14
 );
15 15
 
16 16
 my $iso_date = App::WRT::Date::iso_date(0);
17
+diag($iso_date);
17 18
 ok(
18
-  $iso_date eq '1969-12-31T17:00:00Z',
19
-  'ISO date for epoch'
19
+  $iso_date =~ m/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z/,
20
+  'ISO-ish date for epoch'
20 21
 );
21 22
 
22 23
 ok(

Loading…
İptal
Kaydet