From: schwarze Date: Wed, 15 May 2024 19:37:24 +0000 (+0000) Subject: Add a complete set of tests for all C0 and C1 control characters. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=20cffd756b5d514aa9313224096e8df08c2db3fa;p=openbsd Add a complete set of tests for all C0 and C1 control characters. This is particularly useful to make sure that man(1) does not let control characters sneak through to the output side, no matter how hard an input file tries to deceive it. --- diff --git a/regress/usr.bin/mandoc/char/unicode/nogroff.in b/regress/usr.bin/mandoc/char/unicode/nogroff.in index 9e2b595dc85..70853b5d486 100644 --- a/regress/usr.bin/mandoc/char/unicode/nogroff.in +++ b/regress/usr.bin/mandoc/char/unicode/nogroff.in @@ -1,4 +1,4 @@ -.\" $OpenBSD: nogroff.in,v 1.6 2021/06/02 17:36:59 schwarze Exp $ +.\" $OpenBSD: nogroff.in,v 1.7 2024/05/15 19:37:24 schwarze Exp $ .TH CHAR-UNICODE-NOGROFF 1 "June 2, 2021" .SH NAME char-unicode-nogroff \- characters handled differently by groff @@ -7,6 +7,11 @@ char-unicode-nogroff \- characters handled differently by groff BEGINTEST \[u0000]\N'0' NULL \[u0001]\N'1' START OF HEADING +\[u0002]\N'2' START OF TEXT +\[u0003]\N'3' END OF TEXT +\[u0004]\N'4' END OF TRANSMISSION +\[u0005]\N'5' ENQUIRY +\[u0006]\N'6' ACKNOWLEDGE \[u0007]\N'7' BELL \[u0008]\N'8' BACKSPACE \[u0009]\N'9' CHARACTER TABULATION @@ -14,12 +19,55 @@ BEGINTEST \[u000B]\N'11' LINE TABULATION \[u000C]\N'12' FORM FEED \[u000D]\N'13' CARRIAGE RETURN +\[u000E]\N'14' SHIFT OUT +\[u000F]\N'15' SHIFT IN +\[u0010]\N'16' DATA LINK ESCAPE +\[u0011]\N'17' DEVICE CONTROL ONE +\[u0012]\N'18' DEVICE CONTROL TWO +\[u0013]\N'19' DEVICE CONTROL THREE +\[u0014]\N'20' DEVICE CONTROL FOUR +\[u0015]\N'21' NEGATIVE ACKNOWLEDGE +\[u0016]\N'22' SYNCHRONOUS IDLE +\[u0017]\N'23' END OF TRANSMISSION BLOCK +\[u0018]\N'24' CANCEL +\[u0019]\N'25' END OF MEDIUM +\[u001A]\N'26' SUBSTITUTE \[u001B]\N'27' ESCAPE +\[u001C]\N'28' INFORMATION SEPARATOR FOUR +\[u001D]\N'29' INFORMATION SEPARATOR THREE +\[u001E]\N'30' INFORMATION SEPARATOR TWO +\[u001F]\N'31' INFORMATION SEPARATOR INE \[u007F]\N'127' DELETE \[u0080]\N'128' 0x80 \[u0081]\N'129' 0x81 \[u0082]\N'130' BREAK PERMITTED HERE \[u0083]\N'131' NO BREAK HERE +\[u0084]\N'132' 0x84 +\[u0085]\N'133' NEXT LINE (NEL) +\[u0086]\N'134' START OF SELECTED AREA +\[u0087]\N'135' END OF SELECTED AREA +\[u0088]\N'136' CHARACTER TABULATION SET +\[u0089]\N'137' CHARACTER TABULATION WITH JUSTIFICATION +\[u008A]\N'138' LINE TABULATION SET +\[u008B]\N'139' PARTIAL LINE FORWARD +\[u008C]\N'140' PARTIAL LINE BACKWARD +\[u008D]\N'141' REVERSE LINE FEED +\[u008E]\N'142' SINGLE SHIFT TWO +\[u008F]\N'143' SINGLE SHIFT THREE +\[u0090]\N'144' DEVICE CONTROL STRING +\[u0091]\N'145' PRIVATE USE ONE +\[u0092]\N'146' PRIVATE USE TWO +\[u0093]\N'147' SET TRANSMIT STATE +\[u0094]\N'148' CANCEL CHARACTER +\[u0095]\N'149' MESSAGE WAITING +\[u0096]\N'150' START OF GUARDED AREA +\[u0097]\N'151' END OF GUARDED AREA +\[u0098]\N'152' START OF STRING +\[u0099]\N'153' 0x99 +\[u009A]\N'154' SINGLE CHARACTER INTRODUCER +\[u009B]\N'155' CONTROL SEQUENCE INTRODUCER +\[u009C]\N'156' STRING TERMINATOR +\[u009D]\N'157' OPERATING SYSTEM COMMAND \[u009E]\N'158' PRIVACY MESSAGE \[u009F]\N'159' APPLICATION PROGRAM COMMAND \[u226A]\(<< MUCH LESS-THAN diff --git a/regress/usr.bin/mandoc/char/unicode/nogroff.out_ascii b/regress/usr.bin/mandoc/char/unicode/nogroff.out_ascii index d9d53ce2da2..8bd4d374de8 100644 --- a/regress/usr.bin/mandoc/char/unicode/nogroff.out_ascii +++ b/regress/usr.bin/mandoc/char/unicode/nogroff.out_ascii @@ -7,6 +7,11 @@ DDEESSCCRRIIPPTTIIOONN BEGINTEST NULL START OF HEADING + START OF TEXT + END OF TEXT + END OF TRANSMISSION + ENQUIRY + ACKNOWLEDGE BELL BACKSPACE CHARACTER TABULATION @@ -14,12 +19,55 @@ DDEESSCCRRIIPPTTIIOONN LINE TABULATION FORM FEED CARRIAGE RETURN + SHIFT OUT + SHIFT IN + DATA LINK ESCAPE + DEVICE CONTROL ONE + DEVICE CONTROL TWO + DEVICE CONTROL THREE + DEVICE CONTROL FOUR + NEGATIVE ACKNOWLEDGE + SYNCHRONOUS IDLE + END OF TRANSMISSION BLOCK + CANCEL + END OF MEDIUM + SUBSTITUTE ESCAPE + INFORMATION SEPARATOR FOUR + INFORMATION SEPARATOR THREE + INFORMATION SEPARATOR TWO + INFORMATION SEPARATOR INE DELETE <80><80> 0x80 <81><81> 0x81 <82><82> BREAK PERMITTED HERE <83><83> NO BREAK HERE + <84><84> 0x84 + <85><85> NEXT LINE (NEL) + <86><86> START OF SELECTED AREA + <87><87> END OF SELECTED AREA + <88><88> CHARACTER TABULATION SET + <89><89> CHARACTER TABULATION WITH JUSTIFICATION + <8A><8A> LINE TABULATION SET + <8B><8B> PARTIAL LINE FORWARD + <8C><8C> PARTIAL LINE BACKWARD + <8D><8D> REVERSE LINE FEED + <8E><8E> SINGLE SHIFT TWO + <8F><8F> SINGLE SHIFT THREE + <90><90> DEVICE CONTROL STRING + <91><91> PRIVATE USE ONE + <92><92> PRIVATE USE TWO + <93><93> SET TRANSMIT STATE + <94><94> CANCEL CHARACTER + <95><95> MESSAGE WAITING + <96><96> START OF GUARDED AREA + <97><97> END OF GUARDED AREA + <98><98> START OF STRING + <99><99> 0x99 + <9A><9A> SINGLE CHARACTER INTRODUCER + <9B><9B> CONTROL SEQUENCE INTRODUCER + <9C><9C> STRING TERMINATOR + <9D><9D> OPERATING SYSTEM COMMAND <9E><9E> PRIVACY MESSAGE <9F><9F> APPLICATION PROGRAM COMMAND <<<< MUCH LESS-THAN diff --git a/regress/usr.bin/mandoc/char/unicode/nogroff.out_html b/regress/usr.bin/mandoc/char/unicode/nogroff.out_html index 78639657eb4..5c48e9d7eaf 100644 --- a/regress/usr.bin/mandoc/char/unicode/nogroff.out_html +++ b/regress/usr.bin/mandoc/char/unicode/nogroff.out_html @@ -1,5 +1,10 @@ �� <control> NULL �� <control> START OF HEADING +�� <control> START OF TEXT +�� <control> END OF TEXT +�� <control> END OF TRANSMISSION +�� <control> ENQUIRY +�� <control> ACKNOWLEDGE �� <control> BELL �� <control> BACKSPACE <control> CHARACTER TABULATION @@ -7,12 +12,55 @@ �� <control> LINE TABULATION �� <control> FORM FEED �� <control> CARRIAGE RETURN +�� <control> SHIFT OUT +�� <control> SHIFT IN +�� <control> DATA LINK ESCAPE +�� <control> DEVICE CONTROL ONE +�� <control> DEVICE CONTROL TWO +�� <control> DEVICE CONTROL THREE +�� <control> DEVICE CONTROL FOUR +�� <control> NEGATIVE ACKNOWLEDGE +�� <control> SYNCHRONOUS IDLE +�� <control> END OF TRANSMISSION BLOCK +�� <control> CANCEL +�� <control> END OF MEDIUM +�� <control> SUBSTITUTE �� <control> ESCAPE +�� <control> INFORMATION SEPARATOR FOUR +�� <control> INFORMATION SEPARATOR THREE +�� <control> INFORMATION SEPARATOR TWO +�� <control> INFORMATION SEPARATOR INE �� <control> DELETE �� <control> 0x80 �� <control> 0x81 �� <control> BREAK PERMITTED HERE �� <control> NO BREAK HERE +�� <control> 0x84 +�� <control> NEXT LINE (NEL) +�� <control> START OF SELECTED AREA +�� <control> END OF SELECTED AREA +�� <control> CHARACTER TABULATION SET +�� <control> CHARACTER TABULATION WITH JUSTIFICATION +�� <control> LINE TABULATION SET +�� <control> PARTIAL LINE FORWARD +�� <control> PARTIAL LINE BACKWARD +�� <control> REVERSE LINE FEED +�� <control> SINGLE SHIFT TWO +�� <control> SINGLE SHIFT THREE +�� <control> DEVICE CONTROL STRING +�� <control> PRIVATE USE ONE +�� <control> PRIVATE USE TWO +�� <control> SET TRANSMIT STATE +�� <control> CANCEL CHARACTER +�� <control> MESSAGE WAITING +�� <control> START OF GUARDED AREA +�� <control> END OF GUARDED AREA +�� <control> START OF STRING +�� <control> 0x99 +�� <control> SINGLE CHARACTER INTRODUCER +�� <control> CONTROL SEQUENCE INTRODUCER +�� <control> STRING TERMINATOR +�� <control> OPERATING SYSTEM COMMAND �� <control> PRIVACY MESSAGE �� <control> APPLICATION PROGRAM COMMAND ≪≪ MUCH LESS-THAN diff --git a/regress/usr.bin/mandoc/char/unicode/nogroff.out_utf8 b/regress/usr.bin/mandoc/char/unicode/nogroff.out_utf8 index 98534ec7bd8..bad1c23817a 100644 --- a/regress/usr.bin/mandoc/char/unicode/nogroff.out_utf8 +++ b/regress/usr.bin/mandoc/char/unicode/nogroff.out_utf8 @@ -7,6 +7,11 @@ DDEESSCCRRIIPPTTIIOONN BEGINTEST �� NULL �� START OF HEADING + �� START OF TEXT + �� END OF TEXT + �� END OF TRANSMISSION + �� ENQUIRY + �� ACKNOWLEDGE �� BELL �� BACKSPACE CHARACTER TABULATION @@ -14,12 +19,55 @@ DDEESSCCRRIIPPTTIIOONN �� LINE TABULATION �� FORM FEED �� CARRIAGE RETURN + �� SHIFT OUT + �� SHIFT IN + �� DATA LINK ESCAPE + �� DEVICE CONTROL ONE + �� DEVICE CONTROL TWO + �� DEVICE CONTROL THREE + �� DEVICE CONTROL FOUR + �� NEGATIVE ACKNOWLEDGE + �� SYNCHRONOUS IDLE + �� END OF TRANSMISSION BLOCK + �� CANCEL + �� END OF MEDIUM + �� SUBSTITUTE �� ESCAPE + �� INFORMATION SEPARATOR FOUR + �� INFORMATION SEPARATOR THREE + �� INFORMATION SEPARATOR TWO + �� INFORMATION SEPARATOR INE �� DELETE �� 0x80 �� 0x81 �� BREAK PERMITTED HERE �� NO BREAK HERE + �� 0x84 + �� NEXT LINE (NEL) + �� START OF SELECTED AREA + �� END OF SELECTED AREA + �� CHARACTER TABULATION SET + �� CHARACTER TABULATION WITH JUSTIFICATION + �� LINE TABULATION SET + �� PARTIAL LINE FORWARD + �� PARTIAL LINE BACKWARD + �� REVERSE LINE FEED + �� SINGLE SHIFT TWO + �� SINGLE SHIFT THREE + �� DEVICE CONTROL STRING + �� PRIVATE USE ONE + �� PRIVATE USE TWO + �� SET TRANSMIT STATE + �� CANCEL CHARACTER + �� MESSAGE WAITING + �� START OF GUARDED AREA + �� END OF GUARDED AREA + �� START OF STRING + �� 0x99 + �� SINGLE CHARACTER INTRODUCER + �� CONTROL SEQUENCE INTRODUCER + �� STRING TERMINATOR + �� OPERATING SYSTEM COMMAND �� PRIVACY MESSAGE �� APPLICATION PROGRAM COMMAND ≪≪ MUCH LESS-THAN