Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

variables with -s varname= are now case-insensitive

  • Loading branch information...
commit 85c7815798e42bf503383e31fe190c6ed571ea55 1 parent 608cf54
@sni authored
View
3  Webinject/Changes
@@ -7,6 +7,9 @@ For information and documentation, visit the website at http://www.webinject.org
---------------------------------
Release History:
+Version 1.70 - ...
+ - variables with -s varname= are now case-insensitive
+
Version 1.69 - Tue Jul 12 10:25:17 CEST 2011
- better error message when LWP::protocol::https is missing
- read break_on_errors setting from config file too
View
6 Webinject/lib/Webinject.pm
@@ -31,7 +31,7 @@ use Error qw(:try); # for web services verification (you may comment
use Data::Dumper; # dump hashes for debugging
use File::Temp qw/ tempfile /; # create temp files
-our $VERSION = '1.69';
+our $VERSION = '1.70';
=head1 NAME
@@ -1412,6 +1412,10 @@ sub _convtestcases {
$line =~ s/&/{AMPERSAND}/gmx;
$line =~ s/\\</{LESSTHAN}/gmx;
+ # convert variables to lowercase
+ $line =~ s/(\$\{[\w\.]+\})/\L$1\E/gmx;
+ $line =~ s/(varname=('|").*?('|"))/\L$1\E/gmx;
+
# count cases while we are here
if ( $line =~ /<case/mx ) {
$self->{'result'}->{'casecount'}++;
View
2  Webinject/t/02-Test_Cases.t
@@ -158,7 +158,7 @@ sub test_case_07 {
##################################################
# Test Case 8 / File 08
sub test_case_08 {
- @ARGV = ("-s", "baseurl=http://localhost:58080", "-s", "code1=200", "-s", "code_500=500", $Bin."/data/08-custom_var.xml");
+ @ARGV = ("-s", "baseurl=http://localhost:58080", "-s", "code1=200", "-s", "code_500=500", "-s", "method=get", $Bin."/data/08-custom_var.xml");
my $webinject = Webinject->new();
my $rc = $webinject->engine();
is($webinject->{'result'}->{'totalpassedcount'}, 1, '08-custom_var.xml - passed count');
View
2  Webinject/t/data/08-custom_var.xml
@@ -9,7 +9,7 @@
<case
id = "2"
description1 = "test response code 500"
- method = "get"
+ method = "${metHOD}"
url = "${BASEURL}/code/${code_500}"
verifyresponsecode = "${code1}"
/>
Please sign in to comment.
Something went wrong with that request. Please try again.