[gtk-doc] rebase, scan: refactor into a 'modulino' and add a test skelleton



commit 399c45191e196a7b2066d6d428ade94bf67feb50
Author: Stefan Sauer <ensonic users sf net>
Date:   Wed Jun 17 09:18:35 2015 +0200

    rebase,scan: refactor into a 'modulino' and add a test skelleton

 gtkdoc-rebase.in      |  285 +++++++++++++++++++++++++------------------------
 gtkdoc-scan.in        |  236 +++++++++++++++++++++--------------------
 tests/Makefile.am     |    2 +-
 tests/gtkdoc-rebase.t |   30 +++++
 tests/gtkdoc-scan.t   |   30 +++++
 5 files changed, 327 insertions(+), 256 deletions(-)
---
diff --git a/gtkdoc-rebase.in b/gtkdoc-rebase.in
index 68504b5..202a348 100644
--- a/gtkdoc-rebase.in
+++ b/gtkdoc-rebase.in
@@ -42,26 +42,41 @@ my $ONLINE;
 my $RELATIVE;
 my $VERBOSE;
 
-my %optctl = ('html-dir' => \$HTML_DIR,
-             'other-dir' => \ OTHER_DIRS,
-             'dest-dir' => \$DEST_DIR,
-             'online' => \$ONLINE,
-             'relative' => \$RELATIVE,
-             'aggressive' => \$AGGRESSIVE,
-             'verbose' => \$VERBOSE,
-             'version' => \$PRINT_VERSION,
-             'help' => \$PRINT_HELP);
-GetOptions(\%optctl, 'html-dir=s', 'other-dir=s@', 'dest-dir:s',
-                    'online', 'relative', 'aggressive', 'verbose',
-                    'version', 'help');
-
-if ($PRINT_VERSION) {
-    print "@VERSION \n";
-    exit 0;
-}
+# Maps.
+# These two point to the last seen URI of given type for a package:
+# OnlineMap: package => on-line URI
+# LocalMap: package => local URI
+# This maps all seen URIs of a package to fix broken links in the process:
+# RevMap: URI => package
+my (%OnlineMap, %LocalMap, %RevMap);
+# Remember what mangling we did.
+my %Mapped;
 
-if ($PRINT_HELP) {
-    print <<EOF;
+
+run() unless caller; # Run program unless loaded as a module
+
+
+sub run {
+    my %optctl = ('html-dir' => \$HTML_DIR,
+            'other-dir' => \ OTHER_DIRS,
+            'dest-dir' => \$DEST_DIR,
+            'online' => \$ONLINE,
+            'relative' => \$RELATIVE,
+            'aggressive' => \$AGGRESSIVE,
+            'verbose' => \$VERBOSE,
+            'version' => \$PRINT_VERSION,
+            'help' => \$PRINT_HELP);
+    GetOptions(\%optctl, 'html-dir=s', 'other-dir=s@', 'dest-dir:s',
+             'online', 'relative', 'aggressive', 'verbose',
+             'version', 'help');
+    
+    if ($PRINT_VERSION) {
+        print "@VERSION \n";
+        exit 0;
+    }
+    
+    if ($PRINT_HELP) {
+        print <<EOF;
 gtkdoc-rebase version @VERSION@ - rewrite the base url of html files
 
 --html-dir=HTML_DIR     The directory which contains the installed HTML
@@ -77,60 +92,51 @@ gtkdoc-rebase version @VERSION@ - rewrite the base url of html files
 --version               Print the version of this program
 --help                  Print this help
 EOF
-    exit 0;
-}
-
-if (!$HTML_DIR) {
-    die "No HTML directory (--html-dir) given.\n";
-}
-
-# Maps.
-# These two point to the last seen URI of given type for a package:
-# OnlineMap: package => on-line URI
-# LocalMap: package => local URI
-# This maps all seen URIs of a package to fix broken links in the process:
-# RevMap: URI => package
-my (%OnlineMap, %LocalMap, %RevMap);
-# Remember what mangling we did.
-my %Mapped;
-
-my $dir;
-
-# We scan the directory containing GLib and any directories in GNOME2_PATH
-# first, but these will be overriden by any later scans.
-if (defined ($ENV{"GNOME2_PATH"})) {
-    foreach $dir (split(/:/, $ENV{"GNOME2_PATH"})) {
-        $dir = $dir . "/share/gtk-doc/html";
-       if ($dir && -d $dir) {
-           print "Prepending GNOME2_PATH directory: $dir\n" if $VERBOSE;
-           unshift @OTHER_DIRS, $dir;
-       }
+        exit 0;
     }
+    
+    if (!$HTML_DIR) {
+        die "No HTML directory (--html-dir) given.\n";
+    }
+       
+    my $dir;
+    
+    # We scan the directory containing GLib and any directories in GNOME2_PATH
+    # first, but these will be overriden by any later scans.
+    if (defined ($ENV{"GNOME2_PATH"})) {
+        foreach $dir (split(/:/, $ENV{"GNOME2_PATH"})) {
+            $dir = $dir . "/share/gtk-doc/html";
+            if ($dir && -d $dir) {
+                print "Prepending GNOME2_PATH directory: $dir\n" if $VERBOSE;
+                unshift @OTHER_DIRS, $dir;
+            }
+        }
+    }
+    
+    $dir = `pkg-config --variable=prefix glib-2.0`;
+    $dir =~ s/^\s*(\S*)\s*$/$1/;
+    $dir = $dir . "/share/gtk-doc/html";
+    print "Prepending GLib directory $dir\n" if $VERBOSE;
+    unshift @OTHER_DIRS, $dir;
+    
+    # Check all other dirs, but skip already scanned dirs ord subdirs of those
+    if ($DEST_DIR) {
+        $DEST_DIR =~ s#/?$#/#;
+    }
+    $HTML_DIR =~ s#/?$#/#;
+    
+    foreach $dir (@OTHER_DIRS) {
+        &ScanDirectory($dir, $HTML_DIR);
+    }
+    
+    if ($RELATIVE) {
+        &RelativizeLocalMap($HTML_DIR);
+    }
+    
+    &RebaseReferences($HTML_DIR);
+    &PrintWhatWeHaveDone();
 }
 
-$dir = `pkg-config --variable=prefix glib-2.0`;
-$dir =~ s/^\s*(\S*)\s*$/$1/;
-$dir = $dir . "/share/gtk-doc/html";
-print "Prepending GLib directory $dir\n" if $VERBOSE;
-unshift @OTHER_DIRS, $dir;
-
-# Check all other dirs, but skip already scanned dirs ord subdirs of those
-if ($DEST_DIR) {
-    $DEST_DIR =~ s#/?$#/#;
-}
-$HTML_DIR =~ s#/?$#/#;
-
-foreach $dir (@OTHER_DIRS) {
-    &ScanDirectory($dir, $HTML_DIR);
-}
-
-if ($RELATIVE) {
-    &RelativizeLocalMap($HTML_DIR);
-}
-
-&RebaseReferences($HTML_DIR);
-&PrintWhatWeHaveDone();
-
 
 sub ScanDirectory {
     my ($dir, $self) = @_;
@@ -140,35 +146,35 @@ sub ScanDirectory {
     print "Scanning documentation directory $dir\n" if $VERBOSE;
 
     if ("$dir/" eq $self) {
-       print "Excluding self\n" if $VERBOSE;
-       return;
+        print "Excluding self\n" if $VERBOSE;
+        return;
     }
     if (not opendir(HTMLDIR, $dir)) {
-       print "Cannot open $dir: $!\n";
-       return;
+        print "Cannot open $dir: $!\n";
+        return;
     }
 
     my $file;
     foreach $file (readdir(HTMLDIR)) {
-       if ($file eq '.' or $file eq '..') {
-           next;
-       }
-       elsif (-d "$dir/$file") {
-           push @subdirs, $file;
-       }
-       elsif ($file eq "index.sgml") {
-           &AddMap($dir);
-       }
-       elsif ($file eq "index.sgml.gz") {
-           print "Please fix https://bugs.launchpad.net/ubuntu/+source/gtk-doc/+bug/77138\n";;
-       }
+        if ($file eq '.' or $file eq '..') {
+            next;
+        }
+        elsif (-d "$dir/$file") {
+            push @subdirs, $file;
+        }
+        elsif ($file eq "index.sgml") {
+            &AddMap($dir);
+        }
+        elsif ($file eq "index.sgml.gz") {
+            print "Please fix https://bugs.launchpad.net/ubuntu/+source/gtk-doc/+bug/77138\n";;
+        }
     }
     closedir (HTMLDIR);
 
     # Now recursively scan the subdirectories.
     my $d;
     foreach my $subdir (@subdirs) {
-       &ScanDirectory("$dir/$subdir", $self);
+        &ScanDirectory("$dir/$subdir", $self);
     }
 }
 
@@ -180,25 +186,25 @@ sub AddMap {
 
     open(INDEXFILE, $file) || die "Can't open $file: $!";
     while (<INDEXFILE>) {
-       # ONLINE must come before any ANCHORs
-       last if m/^<ANCHOR/;
-       if (m/^<ONLINE\s+href\s*=\s*"([^"]+)"\s*>/) {
-           $onlinedir = $1;
-           # Remove trailing non-directory component.
-           $onlinedir =~ s#(.*/).*#$1#;
-       }
+        # ONLINE must come before any ANCHORs
+        last if m/^<ANCHOR/;
+        if (m/^<ONLINE\s+href\s*=\s*"([^"]+)"\s*>/) {
+            $onlinedir = $1;
+            # Remove trailing non-directory component.
+            $onlinedir =~ s#(.*/).*#$1#;
+        }
     }
     close (INDEXFILE);
 
     $dir =~ s#/?$#/#;
     ($package = $dir) =~ s#.*/([^/]+)/#$1#;
     if ($DEST_DIR and substr($dir, 0, length $DEST_DIR) eq $DEST_DIR) {
-       $dir = substr($dir, -1 + length $DEST_DIR);
+        $dir = substr($dir, -1 + length $DEST_DIR);
     }
     if ($onlinedir) {
-       print "On-line location of $package: $onlinedir\n" if $VERBOSE;
-       $OnlineMap{ $package } = $onlinedir;
-       $RevMap{ $onlinedir } = $package;
+        print "On-line location of $package: $onlinedir\n" if $VERBOSE;
+        $OnlineMap{ $package } = $onlinedir;
+        $RevMap{ $onlinedir } = $package;
     }
     print "Local location of $package: $dir\n" if $VERBOSE;
     $LocalMap{ $package } = $dir;
@@ -209,17 +215,18 @@ sub AddMap {
 sub RelativizeLocalMap {
     my ($self) = @_;
     my $prefix;
+    my $dir;
 
     $self = realpath $self;
     $self =~ s#/?$#/#;
     ($prefix = $self) =~ s#[^/]+/$##;
     foreach my $package (keys %LocalMap) {
-       $dir = $LocalMap{ $package };
-       if (substr($dir, 0, length $prefix) eq $prefix) {
-           $dir = "../" . substr($dir, length $prefix);
-           $LocalMap{ $package } = $dir;
-           print "Relativizing local location of $package to $dir\n" if $VERBOSE;
-       }
+        $dir = $LocalMap{ $package };
+        if (substr($dir, 0, length $prefix) eq $prefix) {
+            $dir = "../" . substr($dir, length $prefix);
+            $LocalMap{ $package } = $dir;
+            print "Relativizing local location of $package to $dir\n" if $VERBOSE;
+        }
     }
 }
 
@@ -229,9 +236,9 @@ sub RebaseReferences {
 
     opendir(HTMLDIR, $dir) || die "Can't open HTML directory $dir: $!";
     foreach my $file (readdir(HTMLDIR)) {
-       if ($file =~ m/\.html?$/) {
-           &RebaseFile("$dir$file");
-       }
+        if ($file =~ m/\.html?$/) {
+            &RebaseFile("$dir$file");
+        }
     }
     closedir (HTMLDIR);
 }
@@ -263,36 +270,36 @@ sub RebaseLink {
     my ($dir, $origdir, $file, $package);
 
     if ($href =~ m#^(.*/)([^/]*)$#) {
-       $dir = $origdir = $1;
-       $file = $2;
-       if ($RevMap{ $dir }) {
-           $package = $RevMap{ $dir };
-       }
-       elsif ($dir =~ m#^\.\./([^/]+)/#) {
-           $package = $1
-       }
-       elsif ($AGGRESSIVE) {
-           $dir =~ m#([^/]+)/$#;
-           $package = $1;
-       }
-
-       if ($package) {
-           if ($ONLINE && $OnlineMap{ $package }) {
-               $dir = $OnlineMap{ $package };
-           }
-           elsif ($LocalMap{ $package }) {
-               $dir = $LocalMap{ $package };
-           }
-           $href = $dir . $file;
-       }
-       if ($dir ne $origdir) {
-           if ($Mapped{ $origdir }) {
-               $Mapped{ $origdir }->[1]++;
-           }
-           else {
-               $Mapped{ $origdir } = [ $dir, 1 ];
-           }
-       }
+        $dir = $origdir = $1;
+        $file = $2;
+        if ($RevMap{ $dir }) {
+            $package = $RevMap{ $dir };
+        }
+        elsif ($dir =~ m#^\.\./([^/]+)/#) {
+            $package = $1
+        }
+        elsif ($AGGRESSIVE) {
+            $dir =~ m#([^/]+)/$#;
+            $package = $1;
+        }
+      
+        if ($package) {
+            if ($ONLINE && $OnlineMap{ $package }) {
+              $dir = $OnlineMap{ $package };
+            }
+            elsif ($LocalMap{ $package }) {
+              $dir = $LocalMap{ $package };
+            }
+            $href = $dir . $file;
+        }
+        if ($dir ne $origdir) {
+            if ($Mapped{ $origdir }) {
+              $Mapped{ $origdir }->[1]++;
+            }
+            else {
+              $Mapped{ $origdir } = [ $dir, 1 ];
+            }
+        }
     }
     return $href;
 }
@@ -301,7 +308,7 @@ sub RebaseLink {
 sub PrintWhatWeHaveDone {
     my ($origdir, $info);
     foreach $origdir (sort keys %Mapped) {
-       $info = $Mapped{$origdir};
-       print "$origdir -> ", $info->[0], " (", $info->[1], ")\n";
+        $info = $Mapped{$origdir};
+        print "$origdir -> ", $info->[0], " (", $info->[1], ")\n";
     }
 }
diff --git a/gtkdoc-scan.in b/gtkdoc-scan.in
index 551f2d2..048e5c9 100755
--- a/gtkdoc-scan.in
+++ b/gtkdoc-scan.in
@@ -61,31 +61,42 @@ my $DEPRECATED_GUARDS;
 # regexp matching decorators that should be ignored
 my $IGNORE_DECORATORS;
 
-my %optctl = (module => \$MODULE,
-              'source-dir' => \ SOURCE_DIRS,
-              'ignore-headers' => \$IGNORE_HEADERS,
-              'output-dir' => \$OUTPUT_DIR,
-              'rebuild-types' => \$REBUILD_TYPES,
-              'rebuild-sections' => \$REBUILD_SECTIONS,
-              'version' => \$PRINT_VERSION,
-              'help' => \$PRINT_HELP,
-              'deprecated-guards' => \$DEPRECATED_GUARDS,
-              'ignore-decorators' => \$IGNORE_DECORATORS);
-GetOptions(\%optctl, "module=s", "source-dir:s", "ignore-headers:s",
-           "output-dir:s", "rebuild-types", "rebuild-sections", "version",
-           "help", "deprecated-guards:s", "ignore-decorators:s");
-
-if ($PRINT_VERSION) {
-    print "@VERSION \n";
-    exit 0;
-}
+my @get_types = ();
 
-if (!$MODULE) {
-    $PRINT_HELP = 1;
-}
+# do not read files twice; checking it here permits to give both srcdir and
+# builddir as --source-dir without fear of duplicities
+my %seen_headers;
+
+
+run() unless caller; # Run program unless loaded as a module
 
-if ($PRINT_HELP) {
-    print <<EOF;
+
+sub run {
+    my %optctl = (module => \$MODULE,
+                  'source-dir' => \ SOURCE_DIRS,
+                  'ignore-headers' => \$IGNORE_HEADERS,
+                  'output-dir' => \$OUTPUT_DIR,
+                  'rebuild-types' => \$REBUILD_TYPES,
+                  'rebuild-sections' => \$REBUILD_SECTIONS,
+                  'version' => \$PRINT_VERSION,
+                  'help' => \$PRINT_HELP,
+                  'deprecated-guards' => \$DEPRECATED_GUARDS,
+                  'ignore-decorators' => \$IGNORE_DECORATORS);
+    GetOptions(\%optctl, "module=s", "source-dir:s", "ignore-headers:s",
+               "output-dir:s", "rebuild-types", "rebuild-sections", "version",
+               "help", "deprecated-guards:s", "ignore-decorators:s");
+    
+    if ($PRINT_VERSION) {
+        print "@VERSION \n";
+        exit 0;
+    }
+    
+    if (!$MODULE) {
+        $PRINT_HELP = 1;
+    }
+    
+    if ($PRINT_HELP) {
+        print <<EOF;
 gtkdoc-scan version @VERSION@ - scan header files for public symbols
 
 --module=MODULE_NAME       Name of the doc module being parsed
@@ -103,103 +114,96 @@ gtkdoc-scan version @VERSION@ - scan header files for public symbols
 --version                  Print the version of this program
 --help                     Print this help
 EOF
-    exit 0;
-}
-
-$DEPRECATED_GUARDS = $DEPRECATED_GUARDS ? $DEPRECATED_GUARDS : "does_not_match_any_cpp_symbols_at_all_nope";
-
-$IGNORE_DECORATORS = $IGNORE_DECORATORS || "(?=no)match";
-
-$OUTPUT_DIR = $OUTPUT_DIR ? $OUTPUT_DIR : ".";
-
-if (!-d ${OUTPUT_DIR}) {
-    mkdir($OUTPUT_DIR, 0755) || die "Cannot create $OUTPUT_DIR: $!";
-}
-
-my $old_decl_list = "${OUTPUT_DIR}/$MODULE-decl-list.txt";
-my $new_decl_list = "${OUTPUT_DIR}/$MODULE-decl-list.new";
-my $old_decl = "${OUTPUT_DIR}/$MODULE-decl.txt";
-my $new_decl = "${OUTPUT_DIR}/$MODULE-decl.new";
-my $old_types = "${OUTPUT_DIR}/$MODULE.types";
-my $new_types = "${OUTPUT_DIR}/$MODULE.types.new";
-my $sections_file = "${OUTPUT_DIR}/$MODULE-sections.txt";
-
-# If this is the very first run then we create the .types file automatically.
-if (! -e $sections_file && ! -e $old_types) {
-    $REBUILD_TYPES = 1;
-}
-
-open (DECLLIST, ">$new_decl_list")
-    || die "Can't open $new_decl_list";
-open (DECL, ">$new_decl")
-    || die "Can't open $new_decl";
-if ($REBUILD_TYPES) {
-    open (TYPES, ">$new_types")
-        || die "Can't open $new_types";
-}
-
-my %section_list = ();
-my $file;
-
-my @get_types = ();
-
-
-# do not read files twice; checking it here permits to give both srcdir and
-# builddir as --source-dir without fear of duplicities
-my %seen_headers;
-
-# The header files to scan are passed in as command-line args.
-for $file (@ARGV) {
-    &ScanHeader ($file, \%section_list);
-}
-
-for my $dir (@SOURCE_DIRS) {
-    &ScanHeaders ($dir, \%section_list);
-}
-
-## FIXME: sort by key and output
-#print DECLLIST $section_list;
-my $section;
-foreach $section (sort(keys %section_list)) {
-    print DECLLIST "$section_list{$section}";
-}
-
-close (DECLLIST);
-close (DECL);
-
-if ($REBUILD_TYPES) {
-    my $func;
-
-    foreach $func (sort(@get_types)) {
-       print TYPES "$func\n";
+        exit 0;
     }
-    close (TYPES);
-    &UpdateFileIfChanged ($old_types, $new_types, 1);
-
-    # remove the file if empty
-    if (scalar (@get_types) == 0) {
-        unlink ("$new_types");
+    
+    $DEPRECATED_GUARDS = $DEPRECATED_GUARDS ? $DEPRECATED_GUARDS : 
"does_not_match_any_cpp_symbols_at_all_nope";
+    
+    $IGNORE_DECORATORS = $IGNORE_DECORATORS || "(?=no)match";
+    
+    $OUTPUT_DIR = $OUTPUT_DIR ? $OUTPUT_DIR : ".";
+    
+    if (!-d ${OUTPUT_DIR}) {
+        mkdir($OUTPUT_DIR, 0755) || die "Cannot create $OUTPUT_DIR: $!";
+    }
+    
+    my $old_decl_list = "${OUTPUT_DIR}/$MODULE-decl-list.txt";
+    my $new_decl_list = "${OUTPUT_DIR}/$MODULE-decl-list.new";
+    my $old_decl = "${OUTPUT_DIR}/$MODULE-decl.txt";
+    my $new_decl = "${OUTPUT_DIR}/$MODULE-decl.new";
+    my $old_types = "${OUTPUT_DIR}/$MODULE.types";
+    my $new_types = "${OUTPUT_DIR}/$MODULE.types.new";
+    my $sections_file = "${OUTPUT_DIR}/$MODULE-sections.txt";
+    
+    # If this is the very first run then we create the .types file automatically.
+    if (! -e $sections_file && ! -e $old_types) {
+        $REBUILD_TYPES = 1;
+    }
+    
+    open (DECLLIST, ">$new_decl_list")
+        || die "Can't open $new_decl_list";
+    open (DECL, ">$new_decl")
+        || die "Can't open $new_decl";
+    if ($REBUILD_TYPES) {
+        open (TYPES, ">$new_types")
+            || die "Can't open $new_types";
+    }
+    
+    my %section_list = ();
+    my $file;
+   
+    # The header files to scan are passed in as command-line args.
+    for $file (@ARGV) {
+        &ScanHeader ($file, \%section_list);
+    }
+    
+    for my $dir (@SOURCE_DIRS) {
+        &ScanHeaders ($dir, \%section_list);
+    }
+    
+    ## FIXME: sort by key and output
+    #print DECLLIST $section_list;
+    my $section;
+    foreach $section (sort(keys %section_list)) {
+        print DECLLIST "$section_list{$section}";
+    }
+    
+    close (DECLLIST);
+    close (DECL);
+    
+    if ($REBUILD_TYPES) {
+        my $func;
+    
+        foreach $func (sort(@get_types)) {
+           print TYPES "$func\n";
+        }
+        close (TYPES);
+        &UpdateFileIfChanged ($old_types, $new_types, 1);
+    
+        # remove the file if empty
+        if (scalar (@get_types) == 0) {
+            unlink ("$new_types");
+        }
+    }
+    
+    &UpdateFileIfChanged ($old_decl_list, $new_decl_list, 1);
+    &UpdateFileIfChanged ($old_decl, $new_decl, 1);
+    
+    # If there is no MODULE-sections.txt file yet or we are asked to rebuild it,
+    # we copy the MODULE-decl-list.txt file into its place. The user can tweak it
+    # later if they want.
+    if ($REBUILD_SECTIONS || ! -e $sections_file) {
+      `cp $old_decl_list $sections_file`;
+    }
+    
+    # If there is no MODULE-overrides.txt file we create an empty one
+    # because EXTRA_DIST in gtk-doc.make requires it.
+    my $overrides_file = "${OUTPUT_DIR}/$MODULE-overrides.txt";
+    if (! -e $overrides_file) {
+      `touch $overrides_file`;
     }
 }
 
-&UpdateFileIfChanged ($old_decl_list, $new_decl_list, 1);
-&UpdateFileIfChanged ($old_decl, $new_decl, 1);
-
-# If there is no MODULE-sections.txt file yet or we are asked to rebuild it,
-# we copy the MODULE-decl-list.txt file into its place. The user can tweak it
-# later if they want.
-if ($REBUILD_SECTIONS || ! -e $sections_file) {
-  `cp $old_decl_list $sections_file`;
-}
-
-# If there is no MODULE-overrides.txt file we create an empty one
-# because EXTRA_DIST in gtk-doc.make requires it.
-my $overrides_file = "${OUTPUT_DIR}/$MODULE-overrides.txt";
-if (! -e $overrides_file) {
-  `touch $overrides_file`;
-}
-
-
 
 #############################################################################
 # Function    : ScanHeaders
diff --git a/tests/Makefile.am b/tests/Makefile.am
index edc3a5f..baad3b5 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -5,7 +5,7 @@ SUBDIRS = gobject bugs annotations fail empty .
 if BUILD_TESTS
 
 TESTS = \
-  gtkdoc-common.t gtkdoc-fixxref.t gtkdoc-mkdb.t \
+  gtkdoc-common.t gtkdoc-fixxref.t gtkdoc-mkdb.t gtkdoc-rebase.t gtkdoc-scan.t \
   tools.sh gobject.sh bugs.sh annotations.sh fail.sh empty.sh sanity.sh
 TESTS_ENVIRONMENT = \
        BUILDDIR=$(abs_builddir) \
diff --git a/tests/gtkdoc-rebase.t b/tests/gtkdoc-rebase.t
new file mode 100755
index 0000000..6d5c7d5
--- /dev/null
+++ b/tests/gtkdoc-rebase.t
@@ -0,0 +1,30 @@
+#!/usr/bin/env perl
+# -*- cperl -*-
+#
+# gtk-doc - GTK DocBook documentation generator.
+# Copyright (C) 2015  Stefan Sauer
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+
+use diagnostics;
+use warnings;
+use strict;
+use Test::More;
+
+require_ok ("gtkdoc-rebase");
+
+done_testing();
+
diff --git a/tests/gtkdoc-scan.t b/tests/gtkdoc-scan.t
new file mode 100755
index 0000000..a04d971
--- /dev/null
+++ b/tests/gtkdoc-scan.t
@@ -0,0 +1,30 @@
+#!/usr/bin/env perl
+# -*- cperl -*-
+#
+# gtk-doc - GTK DocBook documentation generator.
+# Copyright (C) 2015  Stefan Sauer
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+
+use diagnostics;
+use warnings;
+use strict;
+use Test::More;
+
+require_ok ("gtkdoc-scan");
+
+done_testing();
+


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]