Commit ecb3fe63 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

gopher tests: use sws and adjusted to more standard style

parent 6ed72fd7
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -10,11 +10,11 @@ INDEX
#
# Server-side
<reply>
<datacheck>
<data>
iMenu results		error.host	1
0Selector 	/bar	bar.foo.invalid	70
.
</datacheck>
</data>
</reply>

# Client-side
@@ -26,7 +26,7 @@ gopher
Gopher index
 </name>
 <command>
gopher://%HOSTIP:%GOPHERPORT
gopher://%HOSTIP:%GOPHERPORT/1/1200
</command>
</client>

@@ -34,7 +34,7 @@ gopher://%HOSTIP:%GOPHERPORT
# Verify data after the test has been "shot"
<verify>
<protocol>

/1200
</protocol>
</verify>
</testcase>
+4 −4
Original line number Diff line number Diff line
@@ -10,11 +10,11 @@ SELECTOR
#
# Server-side
<reply>
<datacheck>
<data>
iMenu results		error.host	1
0Selector /selector/SELECTOR	/bar	bar.foo.invalid	70
.
</datacheck>
</data>
</reply>

# Client-side
@@ -26,7 +26,7 @@ gopher
Gopher selector
 </name>
 <command>
gopher://%HOSTIP:%GOPHERPORT/1/selector/SELECTOR
gopher://%HOSTIP:%GOPHERPORT/1/selector/SELECTOR/1201
</command>
</client>

@@ -34,7 +34,7 @@ gopher://%HOSTIP:%GOPHERPORT/1/selector/SELECTOR
# Verify data after the test has been "shot"
<verify>
<protocol>
/selector/SELECTOR
/selector/SELECTOR/1201
</protocol>
</verify>
</testcase>
+4 −4
Original line number Diff line number Diff line
@@ -10,12 +10,12 @@ QUERY
#
# Server-side
<reply>
<datacheck>
<data>
iSearch results		error.host	1
0Query query succeeded	/foo	foo.bar.invalid	70
0Selector /the/search/engine	/bar	bar.foo.invalid	70
.
</datacheck>
</data>
</reply>

# Client-side
@@ -27,7 +27,7 @@ gopher
Gopher query
 </name>
 <command>
gopher://%HOSTIP:%GOPHERPORT/7/the/search/engine?query%20succeeded
gopher://%HOSTIP:%GOPHERPORT/7/the/search/engine?query%20succeeded/1202
</command>
</client>

@@ -35,7 +35,7 @@ gopher://%HOSTIP:%GOPHERPORT/7/the/search/engine?query%20succeeded
# Verify data after the test has been "shot"
<verify>
<protocol>
/the/search/engine	query succeeded
/the/search/engine	query succeeded/1202
</protocol>
</verify>
</testcase>
+4 −4
Original line number Diff line number Diff line
@@ -11,11 +11,11 @@ INDEX
#
# Server-side
<reply>
<datacheck>
<data>
iMenu results		error.host	1
0Selector 	/bar	bar.foo.invalid	70
.
</datacheck>
</data>
</reply>

# Client-side
@@ -27,7 +27,7 @@ gopher-ipv6
Gopher IPv6 index
 </name>
 <command>
-g "gopher://%HOSTIP:%GOPHER6PORT"
-g "gopher://%HOSTIP:%GOPHER6PORT/1/moo/1203"
</command>
</client>

@@ -35,7 +35,7 @@ Gopher IPv6 index
# Verify data after the test has been "shot"
<verify>
<protocol>

/moo/1203
</protocol>
</verify>
</testcase>
+5 −0
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@ my $pidfile; # http server pid file
my $logfile;         # http server log file
my $srcdir;
my $fork;
my $gopher = 0;

my $flags  = "";
my $path   = '.';
@@ -72,6 +73,9 @@ while(@ARGV) {
    elsif($ARGV[0] eq '--ipv6') {
        $ipvnum = 6;
    }
    elsif($ARGV[0] eq '--gopher') {
        $gopher = 1;
    }
    elsif($ARGV[0] eq '--port') {
        if($ARGV[1] =~ /^(\d+)$/) {
            $port = $1;
@@ -106,6 +110,7 @@ if(!$logfile) {
    $logfile = server_logfilename($logdir, $proto, $ipvnum, $idnum);
}

$flags .= "--gopher " if($gopher);
$flags .= "--fork " if(defined($fork));
$flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
$flags .= "--ipv$ipvnum --port $port --srcdir \"$srcdir\"";
Loading