[gnumeric] t6500: add ods-strict tests.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] t6500: add ods-strict tests.
- Date: Sun, 4 Sep 2022 13:29:57 +0000 (UTC)
commit c43712b0eb5b1beb53a66d2016bef18b8f2d6c5d
Author: Morten Welinder <terra gnome org>
Date: Sun Sep 4 09:29:36 2022 -0400
t6500: add ods-strict tests.
test/GnumericTest.pm | 4 ++++
test/t6500-strings.pl | 9 +++++++++
2 files changed, 13 insertions(+)
---
diff --git a/test/GnumericTest.pm b/test/GnumericTest.pm
index 979e5086e..1db38de67 100644
--- a/test/GnumericTest.pm
+++ b/test/GnumericTest.pm
@@ -620,6 +620,9 @@ my $noframe_filter = "$PERL -p -e '\$_ = \"\" if m{<gnm:SheetWidgetFrame .*/>}'"
my $noasindex_filter = "$PERL -p -e 'if (/gnm:SheetWidget(List|Combo)/) { s{(
OutputAsIndex=)\"\\d+\"}{\$1\"0\"}; }'";
+my $ods_strict_filter =
+ "$PERL -p -e 's/(placement=\")\\w+(\")/\$1XXX\$2/ if m{<gnm:comments}'";
+
sub normalize_filter {
my ($f) = @_;
return 'cat' unless defined $f;
@@ -631,6 +634,7 @@ sub normalize_filter {
$f =~ s/\bstd:supersub\b/$supersub_filter/;
$f =~ s/\bstd:noframewidget\b/$noframe_filter/;
$f =~ s/\bstd:nocomboasindex\b/$noasindex_filter/;
+ $f =~ s/\bstd:ods_strict\b/$ods_strict_filter/;
return $f;
}
diff --git a/test/t6500-strings.pl b/test/t6500-strings.pl
index f1009bcba..5e505fa81 100755
--- a/test/t6500-strings.pl
+++ b/test/t6500-strings.pl
@@ -22,6 +22,15 @@ if (&subtest ("ods")) {
'filter2' => 'std:drop_generator');
}
+if (&subtest ("ods-strict")) {
+ &message ("Check string ods strict-conformance roundtrip.");
+ &test_roundtrip ($file,
+ 'format' => 'Gnumeric_OpenCalc:openoffice',
+ 'ext' => "ods",
+ 'filter1' => 'std:ods_strict',
+ 'filter2' => 'std:drop_generator | std:ods_strict');
+}
+
my $xls_greek_filter = "$PERL -p -C7 -e '1 while (s{\\b(ValueType=\"60\">Greek[ ?]+)[^ ?<]}{\$1?})'";
if (&subtest ("biff7")) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]