Skip to content

Commit

Permalink
test1119: adapt for .md input
Browse files Browse the repository at this point in the history
Replace logic dealing with `.3` files to handle the Markdown syntax.

Follow-up to eefcc1b curl#12730
Cherry-picked from curl#14097
Closes curl#14125
  • Loading branch information
vszakats committed Jul 9, 2024
1 parent efc2c51 commit 67cc1e3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/test1119.pl
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ sub checkmanpage {
my $line = 1;
while(<$mh>) {
# strip off formatting
$_ =~ s/\\f[BPRI]//;
$_ =~ s/(^|[^A-Z0-9])[*_]+/ /;
# detect global-looking 'CURL[BLABLA]_*' symbols
while(s/\W(CURL(AUTH|E|H|MOPT|OPT|SHOPT|UE|M|SSH|SSLBACKEND|HEADER|FORM|FTP|PIPE|MIMEOPT|GSSAPI|ALTSVC|PROTO|PROXY|UPART|USESSL|_READFUNC|_WRITEFUNC|_CSELECT|_FORMADD|_IPRESOLVE|_REDIR|_RTSPREQ|_TIMECOND|_VERSION)_[a-zA-Z0-9_]+)//) {
my $s = $1;
Expand All @@ -123,11 +123,11 @@ sub checkmanpage {
close($mh);
}

sub scanman3dir {
sub scanman_md_dir {
my ($d) = @_;
opendir(my $dh, $d) ||
die "Can't opendir: $!";
my @mans = grep { /.3\z/ } readdir($dh);
my @mans = grep { /.md\z/ } readdir($dh);
closedir $dh;
for my $m (@mans) {
checkmanpage("$d/$m");
Expand All @@ -136,8 +136,8 @@ sub scanman3dir {


scanallheaders();
scanman3dir("$root/docs/libcurl");
scanman3dir("$root/docs/libcurl/opts");
scanman_md_dir("$root/docs/libcurl");
scanman_md_dir("$root/docs/libcurl/opts");

open my $s, "<", "$root/docs/libcurl/symbols-in-versions";
while(<$s>) {
Expand Down

0 comments on commit 67cc1e3

Please sign in to comment.