gbranden pushed a commit to branch master in repository groff. commit f1d1afb517f77d379c4657667be8cda7bd8ef632 Author: G. Branden Robinson <g.branden.robin...@gmail.com> AuthorDate: Wed Aug 6 10:53:02 2025 -0500
[mm]: Improve test scripts (3/3). * contrib/mm/tests/memoranda-format-correctly.sh: Add "nl -ba" to output pipeline for easy line counting by humans. * contrib/mm/tests/artifacts/memorandum.0: * contrib/mm/tests/artifacts/memorandum.1: * contrib/mm/tests/artifacts/memorandum.2: * contrib/mm/tests/artifacts/memorandum.3: * contrib/mm/tests/artifacts/memorandum.4: * contrib/mm/tests/artifacts/memorandum.5: * contrib/mm/tests/artifacts/memorandum.custom: Update expected output to include line numbers. Also update copyright notice. I've never executed copyright assignment paperwork with the FSF, so my contribution of this script can't be under the FSF's copyright. Also drop empty comment stump at end of comment block. Also make Vim modeline more human-readable. --- contrib/mm/tests/artifacts/memorandum.0 | 264 ++++++++++++------------- contrib/mm/tests/artifacts/memorandum.1 | 264 ++++++++++++------------- contrib/mm/tests/artifacts/memorandum.2 | 264 ++++++++++++------------- contrib/mm/tests/artifacts/memorandum.3 | 264 ++++++++++++------------- contrib/mm/tests/artifacts/memorandum.4 | 132 ++++++------- contrib/mm/tests/artifacts/memorandum.5 | 132 ++++++------- contrib/mm/tests/artifacts/memorandum.custom | 264 ++++++++++++------------- contrib/mm/tests/memoranda-format-correctly.sh | 12 +- 8 files changed, 798 insertions(+), 798 deletions(-) diff --git a/contrib/mm/tests/artifacts/memorandum.0 b/contrib/mm/tests/artifacts/memorandum.0 index cb6f2e75f..62dcccb28 100644 --- a/contrib/mm/tests/artifacts/memorandum.0 +++ b/contrib/mm/tests/artifacts/memorandum.0 @@ -1,132 +1,132 @@ - - - - - - - - ------------------------------------------------------------ - Yoyodyne, Inc. - - - subject: A Blowdown Stack date: 2024-06-12 - Modification to the Turbo - Encabulator from: Art Vandelay - Work Project No. 123 Org. D - File Case 456 C F - xE - G - H - I - - H. E. - Pennypacker - Org. K - J M - xL - N - O - P - - 78-9-ABC - 98-7-DEF - - - - ABSTRACT - - We're changing the world, one obsolescently planned gizmo at - a time. - - - - Successful leverage of our core competencies to achieve - economies of scale has transformed our entire sector of - industry with exciting new synergies in allocating more - money to (already rich) people. - - - - Art Vandelay - President - 501(c)6 Convenor - - - - J-K-axv/hep-QRS H. E. Pennypacker - Chairman - Wealthy Industrialist - - Copy to - A. Pratt - - - - - - - - - - 2 - - - - - B. Sharpe - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 ------------------------------------------------------------ + 9 Yoyodyne, Inc. + 10 + 11 + 12 subject: A Blowdown Stack date: 2024-06-12 + 13 Modification to the Turbo + 14 Encabulator from: Art Vandelay + 15 Work Project No. 123 Org. D + 16 File Case 456 C F + 17 xE + 18 G + 19 H + 20 I + 21 + 22 H. E. + 23 Pennypacker + 24 Org. K + 25 J M + 26 xL + 27 N + 28 O + 29 P + 30 + 31 78-9-ABC + 32 98-7-DEF + 33 + 34 + 35 + 36 ABSTRACT + 37 + 38 We're changing the world, one obsolescently planned gizmo at + 39 a time. + 40 + 41 + 42 + 43 Successful leverage of our core competencies to achieve + 44 economies of scale has transformed our entire sector of + 45 industry with exciting new synergies in allocating more + 46 money to (already rich) people. + 47 + 48 + 49 + 50 Art Vandelay + 51 President + 52 501(c)6 Convenor + 53 + 54 + 55 + 56 J-K-axv/hep-QRS H. E. Pennypacker + 57 Chairman + 58 Wealthy Industrialist + 59 + 60 Copy to + 61 A. Pratt + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 - 2 - + 71 + 72 + 73 + 74 B. Sharpe + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 + 100 + 101 + 102 + 103 + 104 + 105 + 106 + 107 + 108 + 109 + 110 + 111 + 112 + 113 + 114 + 115 + 116 + 117 + 118 + 119 + 120 + 121 + 122 + 123 + 124 + 125 + 126 + 127 + 128 + 129 + 130 + 131 + 132 diff --git a/contrib/mm/tests/artifacts/memorandum.1 b/contrib/mm/tests/artifacts/memorandum.1 index 91fdd4cc1..155594726 100644 --- a/contrib/mm/tests/artifacts/memorandum.1 +++ b/contrib/mm/tests/artifacts/memorandum.1 @@ -1,132 +1,132 @@ - - - - - - - - ------------------------------------------------------------ - Yoyodyne, Inc. - - - subject: A Blowdown Stack date: 2024-06-12 - Modification to the Turbo - Encabulator from: Art Vandelay - Work Project No. 123 Org. D - File Case 456 C F - xE - G - H - I - - H. E. - Pennypacker - Org. K - J M - xL - N - O - P - - 78-9-ABC - 98-7-DEF - - - - ABSTRACT - - We're changing the world, one obsolescently planned gizmo at - a time. - - - - TECHNICAL MEMORANDUM - - - - Successful leverage of our core competencies to achieve - economies of scale has transformed our entire sector of - industry with exciting new synergies in allocating more - money to (already rich) people. - - - - Art Vandelay - President - 501(c)6 Convenor - - - - J-K-axv/hep-QRS H. E. Pennypacker - Chairman - - - - - - - - - - 2 - - - - - Wealthy Industrialist - - Copy to - A. Pratt - B. Sharpe - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 ------------------------------------------------------------ + 9 Yoyodyne, Inc. + 10 + 11 + 12 subject: A Blowdown Stack date: 2024-06-12 + 13 Modification to the Turbo + 14 Encabulator from: Art Vandelay + 15 Work Project No. 123 Org. D + 16 File Case 456 C F + 17 xE + 18 G + 19 H + 20 I + 21 + 22 H. E. + 23 Pennypacker + 24 Org. K + 25 J M + 26 xL + 27 N + 28 O + 29 P + 30 + 31 78-9-ABC + 32 98-7-DEF + 33 + 34 + 35 + 36 ABSTRACT + 37 + 38 We're changing the world, one obsolescently planned gizmo at + 39 a time. + 40 + 41 + 42 + 43 TECHNICAL MEMORANDUM + 44 + 45 + 46 + 47 Successful leverage of our core competencies to achieve + 48 economies of scale has transformed our entire sector of + 49 industry with exciting new synergies in allocating more + 50 money to (already rich) people. + 51 + 52 + 53 + 54 Art Vandelay + 55 President + 56 501(c)6 Convenor + 57 + 58 + 59 + 60 J-K-axv/hep-QRS H. E. Pennypacker + 61 Chairman + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 - 2 - + 71 + 72 + 73 + 74 Wealthy Industrialist + 75 + 76 Copy to + 77 A. Pratt + 78 B. Sharpe + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 + 100 + 101 + 102 + 103 + 104 + 105 + 106 + 107 + 108 + 109 + 110 + 111 + 112 + 113 + 114 + 115 + 116 + 117 + 118 + 119 + 120 + 121 + 122 + 123 + 124 + 125 + 126 + 127 + 128 + 129 + 130 + 131 + 132 diff --git a/contrib/mm/tests/artifacts/memorandum.2 b/contrib/mm/tests/artifacts/memorandum.2 index a0adda8e7..3c9b60b5b 100644 --- a/contrib/mm/tests/artifacts/memorandum.2 +++ b/contrib/mm/tests/artifacts/memorandum.2 @@ -1,132 +1,132 @@ - - - - - - - - ------------------------------------------------------------ - Yoyodyne, Inc. - - - subject: A Blowdown Stack date: 2024-06-12 - Modification to the Turbo - Encabulator from: Art Vandelay - Work Project No. 123 Org. D - File Case 456 C F - xE - G - H - I - - H. E. - Pennypacker - Org. K - J M - xL - N - O - P - - 78-9-ABC - 98-7-DEF - - - - ABSTRACT - - We're changing the world, one obsolescently planned gizmo at - a time. - - - - INTERNAL MEMORANDUM - - - - Successful leverage of our core competencies to achieve - economies of scale has transformed our entire sector of - industry with exciting new synergies in allocating more - money to (already rich) people. - - - - Art Vandelay - President - 501(c)6 Convenor - - - - J-K-axv/hep-QRS H. E. Pennypacker - Chairman - - - - - - - - - - 2 - - - - - Wealthy Industrialist - - Copy to - A. Pratt - B. Sharpe - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 ------------------------------------------------------------ + 9 Yoyodyne, Inc. + 10 + 11 + 12 subject: A Blowdown Stack date: 2024-06-12 + 13 Modification to the Turbo + 14 Encabulator from: Art Vandelay + 15 Work Project No. 123 Org. D + 16 File Case 456 C F + 17 xE + 18 G + 19 H + 20 I + 21 + 22 H. E. + 23 Pennypacker + 24 Org. K + 25 J M + 26 xL + 27 N + 28 O + 29 P + 30 + 31 78-9-ABC + 32 98-7-DEF + 33 + 34 + 35 + 36 ABSTRACT + 37 + 38 We're changing the world, one obsolescently planned gizmo at + 39 a time. + 40 + 41 + 42 + 43 INTERNAL MEMORANDUM + 44 + 45 + 46 + 47 Successful leverage of our core competencies to achieve + 48 economies of scale has transformed our entire sector of + 49 industry with exciting new synergies in allocating more + 50 money to (already rich) people. + 51 + 52 + 53 + 54 Art Vandelay + 55 President + 56 501(c)6 Convenor + 57 + 58 + 59 + 60 J-K-axv/hep-QRS H. E. Pennypacker + 61 Chairman + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 - 2 - + 71 + 72 + 73 + 74 Wealthy Industrialist + 75 + 76 Copy to + 77 A. Pratt + 78 B. Sharpe + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 + 100 + 101 + 102 + 103 + 104 + 105 + 106 + 107 + 108 + 109 + 110 + 111 + 112 + 113 + 114 + 115 + 116 + 117 + 118 + 119 + 120 + 121 + 122 + 123 + 124 + 125 + 126 + 127 + 128 + 129 + 130 + 131 + 132 diff --git a/contrib/mm/tests/artifacts/memorandum.3 b/contrib/mm/tests/artifacts/memorandum.3 index a6c9361eb..cad93b82d 100644 --- a/contrib/mm/tests/artifacts/memorandum.3 +++ b/contrib/mm/tests/artifacts/memorandum.3 @@ -1,132 +1,132 @@ - - - - - - - - ------------------------------------------------------------ - Yoyodyne, Inc. - - - subject: A Blowdown Stack date: 2024-06-12 - Modification to the Turbo - Encabulator from: Art Vandelay - Work Project No. 123 Org. D - File Case 456 C F - xE - G - H - I - - H. E. - Pennypacker - Org. K - J M - xL - N - O - P - - 78-9-ABC - 98-7-DEF - - - - ABSTRACT - - We're changing the world, one obsolescently planned gizmo at - a time. - - - - ADMINISTRATIVE MEMORANDUM - - - - Successful leverage of our core competencies to achieve - economies of scale has transformed our entire sector of - industry with exciting new synergies in allocating more - money to (already rich) people. - - - - Art Vandelay - President - 501(c)6 Convenor - - - - J-K-axv/hep-QRS H. E. Pennypacker - Chairman - - - - - - - - - - 2 - - - - - Wealthy Industrialist - - Copy to - A. Pratt - B. Sharpe - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 ------------------------------------------------------------ + 9 Yoyodyne, Inc. + 10 + 11 + 12 subject: A Blowdown Stack date: 2024-06-12 + 13 Modification to the Turbo + 14 Encabulator from: Art Vandelay + 15 Work Project No. 123 Org. D + 16 File Case 456 C F + 17 xE + 18 G + 19 H + 20 I + 21 + 22 H. E. + 23 Pennypacker + 24 Org. K + 25 J M + 26 xL + 27 N + 28 O + 29 P + 30 + 31 78-9-ABC + 32 98-7-DEF + 33 + 34 + 35 + 36 ABSTRACT + 37 + 38 We're changing the world, one obsolescently planned gizmo at + 39 a time. + 40 + 41 + 42 + 43 ADMINISTRATIVE MEMORANDUM + 44 + 45 + 46 + 47 Successful leverage of our core competencies to achieve + 48 economies of scale has transformed our entire sector of + 49 industry with exciting new synergies in allocating more + 50 money to (already rich) people. + 51 + 52 + 53 + 54 Art Vandelay + 55 President + 56 501(c)6 Convenor + 57 + 58 + 59 + 60 J-K-axv/hep-QRS H. E. Pennypacker + 61 Chairman + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 - 2 - + 71 + 72 + 73 + 74 Wealthy Industrialist + 75 + 76 Copy to + 77 A. Pratt + 78 B. Sharpe + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 + 100 + 101 + 102 + 103 + 104 + 105 + 106 + 107 + 108 + 109 + 110 + 111 + 112 + 113 + 114 + 115 + 116 + 117 + 118 + 119 + 120 + 121 + 122 + 123 + 124 + 125 + 126 + 127 + 128 + 129 + 130 + 131 + 132 diff --git a/contrib/mm/tests/artifacts/memorandum.4 b/contrib/mm/tests/artifacts/memorandum.4 index 011da18ff..2573e46db 100644 --- a/contrib/mm/tests/artifacts/memorandum.4 +++ b/contrib/mm/tests/artifacts/memorandum.4 @@ -1,66 +1,66 @@ - - - - - - - - A Blowdown Stack Modification to the Turbo Encabulator - - Art Vandelay - H. E. Pennypacker - - - Yoyodyne, Inc. - - - ABSTRACT - - - We're changing the world, one obsolescently planned gizmo at - a time. - - - Successful leverage of our core competencies to achieve - economies of scale has transformed our entire sector of - industry with exciting new synergies in allocating more - money to (already rich) people. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 A Blowdown Stack Modification to the Turbo Encabulator + 9 + 10 Art Vandelay + 11 H. E. Pennypacker + 12 + 13 + 14 Yoyodyne, Inc. + 15 + 16 + 17 ABSTRACT + 18 + 19 + 20 We're changing the world, one obsolescently planned gizmo at + 21 a time. + 22 + 23 + 24 Successful leverage of our core competencies to achieve + 25 economies of scale has transformed our entire sector of + 26 industry with exciting new synergies in allocating more + 27 money to (already rich) people. + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 diff --git a/contrib/mm/tests/artifacts/memorandum.5 b/contrib/mm/tests/artifacts/memorandum.5 index b9738ca14..133919219 100644 --- a/contrib/mm/tests/artifacts/memorandum.5 +++ b/contrib/mm/tests/artifacts/memorandum.5 @@ -1,66 +1,66 @@ - - - - - A Blowdown Stack - Modification to the Turbo - Encabulator - Work Project No. 123 - File Case 456 - - - - - - 2024-06-12 - - - Successful leverage of our core competencies to achieve - economies of scale has transformed our entire sector of - industry with exciting new synergies in allocating more - money to (already rich) people. - - - - Art Vandelay - President - 501(c)6 Convenor - - - - H. E. Pennypacker - Chairman - Wealthy Industrialist - - Copy to - A. Pratt - B. Sharpe - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 1 + 2 + 3 + 4 + 5 A Blowdown Stack + 6 Modification to the Turbo + 7 Encabulator + 8 Work Project No. 123 + 9 File Case 456 + 10 + 11 + 12 + 13 + 14 + 15 2024-06-12 + 16 + 17 + 18 Successful leverage of our core competencies to achieve + 19 economies of scale has transformed our entire sector of + 20 industry with exciting new synergies in allocating more + 21 money to (already rich) people. + 22 + 23 + 24 + 25 Art Vandelay + 26 President + 27 501(c)6 Convenor + 28 + 29 + 30 + 31 H. E. Pennypacker + 32 Chairman + 33 Wealthy Industrialist + 34 + 35 Copy to + 36 A. Pratt + 37 B. Sharpe + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 diff --git a/contrib/mm/tests/artifacts/memorandum.custom b/contrib/mm/tests/artifacts/memorandum.custom index c73dab156..b08c43d77 100644 --- a/contrib/mm/tests/artifacts/memorandum.custom +++ b/contrib/mm/tests/artifacts/memorandum.custom @@ -1,132 +1,132 @@ - - - - - - - - ------------------------------------------------------------ - Yoyodyne, Inc. - - - subject: A Blowdown Stack date: 2024-06-12 - Modification to the Turbo - Encabulator from: Art Vandelay - Work Project No. 123 Org. D - File Case 456 C F - xE - G - H - I - - H. E. - Pennypacker - Org. K - J M - xL - N - O - P - - 78-9-ABC - 98-7-DEF - - - - ABSTRACT - - We're changing the world, one obsolescently planned gizmo at - a time. - - - - custom - - - - Successful leverage of our core competencies to achieve - economies of scale has transformed our entire sector of - industry with exciting new synergies in allocating more - money to (already rich) people. - - - - Art Vandelay - President - 501(c)6 Convenor - - - - J-K-axv/hep-QRS H. E. Pennypacker - Chairman - - - - - - - - - - 2 - - - - - Wealthy Industrialist - - Copy to - A. Pratt - B. Sharpe - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 ------------------------------------------------------------ + 9 Yoyodyne, Inc. + 10 + 11 + 12 subject: A Blowdown Stack date: 2024-06-12 + 13 Modification to the Turbo + 14 Encabulator from: Art Vandelay + 15 Work Project No. 123 Org. D + 16 File Case 456 C F + 17 xE + 18 G + 19 H + 20 I + 21 + 22 H. E. + 23 Pennypacker + 24 Org. K + 25 J M + 26 xL + 27 N + 28 O + 29 P + 30 + 31 78-9-ABC + 32 98-7-DEF + 33 + 34 + 35 + 36 ABSTRACT + 37 + 38 We're changing the world, one obsolescently planned gizmo at + 39 a time. + 40 + 41 + 42 + 43 custom + 44 + 45 + 46 + 47 Successful leverage of our core competencies to achieve + 48 economies of scale has transformed our entire sector of + 49 industry with exciting new synergies in allocating more + 50 money to (already rich) people. + 51 + 52 + 53 + 54 Art Vandelay + 55 President + 56 501(c)6 Convenor + 57 + 58 + 59 + 60 J-K-axv/hep-QRS H. E. Pennypacker + 61 Chairman + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 - 2 - + 71 + 72 + 73 + 74 Wealthy Industrialist + 75 + 76 Copy to + 77 A. Pratt + 78 B. Sharpe + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 + 100 + 101 + 102 + 103 + 104 + 105 + 106 + 107 + 108 + 109 + 110 + 111 + 112 + 113 + 114 + 115 + 116 + 117 + 118 + 119 + 120 + 121 + 122 + 123 + 124 + 125 + 126 + 127 + 128 + 129 + 130 + 131 + 132 diff --git a/contrib/mm/tests/memoranda-format-correctly.sh b/contrib/mm/tests/memoranda-format-correctly.sh index fbb38f10a..3bd3765e0 100755 --- a/contrib/mm/tests/memoranda-format-correctly.sh +++ b/contrib/mm/tests/memoranda-format-correctly.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2024 Free Software Foundation, Inc. +# Copyright (C) 2024-2025 G. Branden Robinson # # This file is part of groff. # @@ -16,7 +16,6 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# groff="${abs_top_builddir:-.}/test-groff" @@ -66,7 +65,9 @@ input="$examples_dir"/memorandum.mm for t in 0 1 2 3 4 5 custom do echo "checking formatting of MT type '$t'" >&2 - "$groff" -ww -m m -d mT=$t -T ascii -P -cbou "$input" + output=$("$groff" -ww -m m -d mT=$t -T ascii -P -cbou "$input" \ + | nl -ba | sed 's/[ ]*$//') # That's [tab space]. + echo "$output" # We _would_ use "cut -d' ' -f1-2" here, but Solaris 10 cksum writes # tabs between fields instead of spaces, nonconformantly with POSIX # Issue 4 (1994); see XCU p. 195, PDF p. 217. Quality! So fire up @@ -74,11 +75,10 @@ do # hardware with that fancy proprietary OS. expected=$(cksum "$artifacts_dir"/memorandum.$t \ | awk '{ print $1, $2 }') - actual=$("$groff" -mm -dmT=$t -Tascii -P-cbou "$input" | cksum \ - | awk '{ print $1, $2 }') + actual=$(echo "$output" | cksum | awk '{ print $1, $2 }') test "$actual" = "$expected" || wail done test -z "$fail" -# vim:set ai et sw=4 ts=4 tw=72: +# vim:set autoindent expandtab shiftwidth=4 tabstop=4 textwidth=72: _______________________________________________ groff-commit mailing list groff-commit@gnu.org https://lists.gnu.org/mailman/listinfo/groff-commit