From 0d199c540ada1b6836232c767fa369bdfc8f1b2f Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Fri, 6 Dec 2024 08:08:40 +0000 Subject: [PATCH 1/2] Simple tests for step type and option transitivity --- test-suite/pipelines/nw-library-001.xpl | 13 +++++++ test-suite/pipelines/nw-library-002.xpl | 8 ++++ test-suite/tests/nw-library-001.xml | 50 +++++++++++++++++++++++++ test-suite/tests/nw-library-002.xml | 45 ++++++++++++++++++++++ test-suite/tests/nw-library-003.xml | 50 +++++++++++++++++++++++++ test-suite/tests/nw-library-004.xml | 40 ++++++++++++++++++++ 6 files changed, 206 insertions(+) create mode 100644 test-suite/pipelines/nw-library-001.xpl create mode 100644 test-suite/pipelines/nw-library-002.xpl create mode 100644 test-suite/tests/nw-library-001.xml create mode 100644 test-suite/tests/nw-library-002.xml create mode 100644 test-suite/tests/nw-library-003.xml create mode 100644 test-suite/tests/nw-library-004.xml diff --git a/test-suite/pipelines/nw-library-001.xpl b/test-suite/pipelines/nw-library-001.xpl new file mode 100644 index 000000000..bcfff95e4 --- /dev/null +++ b/test-suite/pipelines/nw-library-001.xpl @@ -0,0 +1,13 @@ + + + + + + + + + + + + diff --git a/test-suite/pipelines/nw-library-002.xpl b/test-suite/pipelines/nw-library-002.xpl new file mode 100644 index 000000000..2c2bd6313 --- /dev/null +++ b/test-suite/pipelines/nw-library-002.xpl @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/test-suite/tests/nw-library-001.xml b/test-suite/tests/nw-library-001.xml new file mode 100644 index 000000000..0175c13b0 --- /dev/null +++ b/test-suite/tests/nw-library-001.xml @@ -0,0 +1,50 @@ + + + + nw-library-001 + + + 2024-12-06 + + Norm Tovey-Walsh + + +

Initial commit

+
+
+
+
+ +

Tests that step imports are transitive.

+
+ + + + + + + + + + + + + + + + + + + The document root is not result. + The first child is not ‘one’ + The first child is not ‘two’ + The first child is not ‘three’ + + + + +
diff --git a/test-suite/tests/nw-library-002.xml b/test-suite/tests/nw-library-002.xml new file mode 100644 index 000000000..8a7607c2b --- /dev/null +++ b/test-suite/tests/nw-library-002.xml @@ -0,0 +1,45 @@ + + + + nw-library-002 + + + 2024-12-06 + + Norm Tovey-Walsh + + +

Initial commit

+
+
+
+
+ +

Tests that step imports are transitive.

+
+ + + + + + + + + + + + + + + + + + + + + +
diff --git a/test-suite/tests/nw-library-003.xml b/test-suite/tests/nw-library-003.xml new file mode 100644 index 000000000..8e5536c72 --- /dev/null +++ b/test-suite/tests/nw-library-003.xml @@ -0,0 +1,50 @@ + + + + nw-library-003 + + + 2024-12-06 + + Norm Tovey-Walsh + + +

Initial commit

+
+
+
+
+ +

Tests that option imports are transitive.

+
+ + + + + + + + + + {$option2} + + + + + + + + + + The document root is not result. + The option value isn’t 42. + The pi value isn’t π. + + + + +
diff --git a/test-suite/tests/nw-library-004.xml b/test-suite/tests/nw-library-004.xml new file mode 100644 index 000000000..1d8aedc11 --- /dev/null +++ b/test-suite/tests/nw-library-004.xml @@ -0,0 +1,40 @@ + + + + nw-library-004 + + + 2024-12-06 + + Norm Tovey-Walsh + + +

Initial commit

+
+
+
+
+ +

Tests that option imports are transitive.

+
+ + + + + + + + + + + + + + + + +
From e28291f2602969e75f486878b2c11e4473cc324d Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Fri, 6 Dec 2024 09:17:44 +0000 Subject: [PATCH 2/2] Test ab-library-024 shadows a static and should fail --- test-suite/tests/ab-library-024.xml | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/test-suite/tests/ab-library-024.xml b/test-suite/tests/ab-library-024.xml index a2640d069..8a96d1cc4 100644 --- a/test-suite/tests/ab-library-024.xml +++ b/test-suite/tests/ab-library-024.xml @@ -1,9 +1,19 @@ - Library import 024 (AB) + + 2024-12-06 + + Norm Tovey-Walsh + + +

On closer examination, this test shadows static option1, which is an error.

+
+
2021-06-10 @@ -47,16 +57,4 @@ - - - - - The document root is not result. - Text child of doc is not 99. - Text child of doc is not 42. - - - - -
\ No newline at end of file +