chiark / gitweb /
Syntax: only some directives' RHS should be &-expanded
[subdirmk.git] / tests / filter / extract-doctest
index 28dee5e..10dd42a 100755 (executable)
@@ -56,6 +56,9 @@ while (<>) {
            $e->{OutTop} = $1 eq 'nothing' ? '' : $1;
        } elsif (# parse: expect other wordish things to be comments
                 m{^(?!or\b)\w{2,} }) {
            $e->{OutTop} = $1 eq 'nothing' ? '' : $1;
        } elsif (# parse: expect other wordish things to be comments
                 m{^(?!or\b)\w{2,} }) {
+       } elsif (m/^$/) {
+       } else {
+           confess "unk rhs $_ ?";
        }
        $e->{CQ} = $in_changequote;
     } else {
        }
        $e->{CQ} = $in_changequote;
     } else {
@@ -129,9 +132,9 @@ sub writeout ($) {
                  '','','', 'normal',
                 sub { !$_[0]{CQ} } );
     write_permode($dir_prefix,
                  '','','', 'normal',
                 sub { !$_[0]{CQ} } );
     write_permode($dir_prefix,
-                 "&:changequote NEWQUOTE",
-                 "NEWQUOTE:changequote &",
-                 "\n",
+                 "&:changequote NEWQUOTE\n",
+                 "NEWQUOTE:changequote &\n",
+                 "",
                  'changequote',
                  sub { $_[0]{CQ} } );
     oh "# doctest ends\n";
                  'changequote',
                  sub { $_[0]{CQ} } );
     oh "# doctest ends\n";