From 4fdf7b706b4e2ee4b0a2b64f9b8ea1bb80b02909 Mon Sep 17 00:00:00 2001 From: Dianne Skoll Date: Wed, 23 Mar 2022 11:47:00 -0400 Subject: [PATCH] More work on making run-time language module match compile-time module. --- include/lang/fr.rem | 8 ++++---- src/compare-language-mods.pl | 10 ++++++++-- tests/tstlang.rem | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/include/lang/fr.rem b/include/lang/fr.rem index 04707b60..eaf40058 100644 --- a/include/lang/fr.rem +++ b/include/lang/fr.rem @@ -52,8 +52,8 @@ FSET subst_1(alt, date, time) iif(time == now(), "maintenant", \ "il y a " + subst_tdiff ((now()-time)/60, (now()-time)%60)) FSET subst_b(alt, date, time) iif(date==today(), $Today, date==today()+1, $Tomorrow, "dans " + (date-today()) + " jours") -FSET subst_j_alt(date) wkday(date) + ", " + day(date) + subst_ordinal(day(date)) + " " + mon(date) + " " + year(date) -FSET subst_j(alt, date, time) iif(alt, subst_j_alt(date), $On + " " + subst_j_alt(date)) +FSET subst_j_alt(date) iif(date==today(), $Today, date==today()+1, $Tomorrow, wkday(date) + ", " + day(date) + subst_ordinal(day(date)) + " " + mon(date) + ", " + year(date)) +FSET subst_j(alt, date, time) iif(date==today(), $Today, date==today()+1, $Tomorrow, alt, subst_j_alt(date), $On + " " + subst_j_alt(date)) -FSET subst_k_alt(date) wkday(date) + ", " + day(date) + subst_ordinal(day(date)) + " " + mon(date) -FSET subst_k(alt, date, time) iif(alt, subst_k_alt(date), $On + " " + subst_k_alt(date)) +FSET subst_k_alt(date) iif(date==today(), $Today, date==today()+1, $Tomorrow, wkday(date) + ", " + day(date) + subst_ordinal(day(date)) + " " + mon(date)) +FSET subst_k(alt, date, time) iif(date==today(), $Today, date==today()+1, $Tomorrow, alt, subst_k_alt(date), $On + " " + subst_k_alt(date)) diff --git a/src/compare-language-mods.pl b/src/compare-language-mods.pl index 5dfde1c3..e42ea495 100755 --- a/src/compare-language-mods.pl +++ b/src/compare-language-mods.pl @@ -32,12 +32,18 @@ my $flag = $language_map->{$lang}; print STDERR "Testing for: $lang - $flag.\n"; my_sys("make clean") && die("make clean failed"); my_sys("make -j6 all LANGDEF=-DLANG=$flag") && die("make all failed"); -my_sys("./remind -q -r ../tests/tstlang.rem > test-$lang-compiled.out 2>&1"); +my_sys("./remind -q -r ../tests/tstlang.rem 2022-03-23 11:44 > test-$lang-compiled.out 2>&1"); my_sys("make clean") && die("make clean failed"); my_sys("make -j6 all") && die("make all failed"); -my_sys("./remind -q -r -ii=\\\"../include/lang/$lang.rem\\\" ../tests/tstlang.rem > test-$lang-runtime.out 2>&1"); +my_sys("./remind -q -r -ii=\\\"../include/lang/$lang.rem\\\" ../tests/tstlang.rem 2022-03-23 11:44 > test-$lang-runtime.out 2>&1"); +my $rc = my_sys("cmp test-$lang-compiled.out test-$lang-runtime.out > /dev/null 2>&1"); +if ($rc == 0) { + print STDERR "Congrats! Compiled and runtime language output matches for $lang.\n"; +} else { + print STDERR "Whoops. Compiled and runtime language output differs for $lang.\n" +} exit(0); sub my_sys diff --git a/tests/tstlang.rem b/tests/tstlang.rem index 31523ed3..df0410bc 100644 --- a/tests/tstlang.rem +++ b/tests/tstlang.rem @@ -32,7 +32,7 @@ endif if defined("i") do [i] - msg INCLUDING [i] +# msg INCLUDING [i] endif # Set up a few useful definitions