From ebe899af0dc3215159a9c896ac6f35b72a18cb6e Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Fri, 17 Dec 2021 21:45:54 +0100 Subject: timezone: test-case for BZ #28707 This test-case is the tzfile for Asuncion generated by tzlib-2021e as follows, using the tzlib-2021e zic: "zic -d DEST -r @1546300800 -L /dev/null -b slim SOURCE/southamerica". Note that in its type 2 header, it has two entries in its "time-types" array (types), but only one entry in its "transition types" array (type_idxs). * timezone/Makefile, timezone/tst-pr28707.c, timezone/testdata/gen-XT5.sh: New test. Co-authored-by: Christopher Wong --- timezone/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'timezone/Makefile') diff --git a/timezone/Makefile b/timezone/Makefile index c624a18..f091663 100644 --- a/timezone/Makefile +++ b/timezone/Makefile @@ -23,7 +23,7 @@ subdir := timezone include ../Makeconfig others := zdump zic -tests := test-tz tst-timezone tst-tzset +tests := test-tz tst-timezone tst-tzset tst-bz28707 generated-dirs += testdata @@ -85,10 +85,12 @@ $(objpfx)tst-timezone.out: $(addprefix $(testdata)/, \ America/Sao_Paulo Asia/Tokyo \ Europe/London) $(objpfx)tst-tzset.out: $(addprefix $(testdata)/XT, 1 2 3 4) +$(objpfx)tst-bz28707.out: $(testdata)/XT5 test-tz-ENV = TZDIR=$(testdata) tst-timezone-ENV = TZDIR=$(testdata) tst-tzset-ENV = TZDIR=$(testdata) +tst-bz28707-ENV = TZDIR=$(testdata) # Note this must come second in the deps list for $(built-program-cmd) to work. zic-deps = $(objpfx)zic $(leapseconds) yearistype @@ -122,6 +124,10 @@ $(testdata)/XT%: testdata/XT% $(make-target-directory) cp $< $@ +$(testdata)/XT%: testdata/gen-XT%.sh + $(SHELL) $< > $@.tmp + mv $@.tmp $@ + $(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make sed -e 's|TZDIR=[^}]*|TZDIR=$(zonedir)|' \ -e '/TZVERSION=/s|see_Makefile|"$(version)"|' \ -- cgit v1.1