Test the CSV header at -n 0, --separator refused with a record format, a date field in time() refused, a bare number template printed as written, and the no-data note

This commit is contained in:
2026-10-08 12:21:13 +02:00
committed by Lillem4n
parent f964816830
commit 332b99ad88
4 changed files with 29 additions and 8 deletions
+1
View File
@@ -276,6 +276,7 @@ func TestBuiltinDateAndTime(t *testing.T) {
func TestBuiltinDateArgs(t *testing.T) {
for tmpl, want := range map[string]string{
`"{date(1990-13-01,1990-12-31,'2006-01-02')}"`: "1990-13-01",
`"{time('2006-01-02 15:04')}"`: "write date(from,to,layout)",
`"{date(1990-12-31,1990-01-01,'2006-01-02')}"`: "is after",
`"{date(1990-01-01,1990-12-31,2006-01-02)}"`: "'2006-01-02'",
`"{date(1990-01-01,1990-12-31,'January 2, 2006)}"`: "'",