Skip to content

Commit 18c4107

Browse files
committed
add 2 more tests
1 parent d48fab4 commit 18c4107

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

tests/testthat/test-fdf_ftf.R

+29
Original file line numberDiff line numberDiff line change
@@ -213,5 +213,34 @@ test_that("fdt() works in all contexts", {
213213
"Thu 7:39:00 in the evening"
214214
)
215215
)
216+
217+
# Copy of a test in gt
218+
expect_equal(
219+
fdt(c(
220+
"1970-01-01 15:35:00", "1970-01-01 16:36:00", "1970-01-01 17:37:00",
221+
"1970-01-01 18:38:00", "1970-01-01 19:39:00"
222+
),
223+
format = "'Q'q k:m"
224+
),
225+
c(
226+
"Q1 16:35", "Q1 17:36",
227+
"Q1 18:37", "Q1 19:38",
228+
"Q1 20:39"
229+
)
230+
)
231+
232+
expect_equal(
233+
fdt(c(
234+
"1970-01-01 15:35:00", "1970-01-01 16:36:00", "1970-01-01 17:37:00",
235+
"1970-01-01 18:38:00", "1970-01-01 19:39:00"
236+
),
237+
format = "QQQQ k:m"
238+
),
239+
c(
240+
"1st quarter 16:35", "1st quarter 17:36",
241+
"1st quarter 18:37", "1st quarter 19:38",
242+
"1st quarter 20:39"
243+
)
244+
)
216245
})
217246

0 commit comments

Comments
 (0)