提交 50c392a8 编写于 作者: aaronchen2k2k's avatar aaronchen2k2k

test Chinese with awesome-gocui/gocui fork

上级 524691b3
@echo off
goto start
[case]
title=check string matches pattern
cid=0
pid=0
[group]
1. exactly match >> hello
2. regular expression match >> 1[0-9]{10}
3. format string match >> %s%d
1. exactly match >> hello
2. regular expression match >> 1[0-9]{10}
3. format string match >> %s%d
[esac]
:start
echo ^>^> hello
echo ^>^> 13905120512
echo ^>^> abc123
echo ^>^> abc123
\ No newline at end of file
......@@ -2,15 +2,14 @@
setlocal enabledelayedexpansion
goto start
[case]
title=extract content from webpage
cid=0
pid=0
[group]
1. Load web page from url http://xxx
2. Retrieve img element zt-logo.png in html
3. Check img exist >> .*zt-logo.png
1. Load web page from url http://xxx
2. Retrieve img element zt-logo.png in html
3. Check img exist >> .*zt-logo.png
[esac]
:start
......@@ -21,4 +20,4 @@ for /f "delims=" %%a in ('curl -s "http://pms.zentao.net/user-login.html" ^| fi
for /f "tokens=2 delims='" %%i in ("!var!") do (
set var2=%%~i
)
echo ^>^> !var2!
echo ^>^> !var2!
\ No newline at end of file
......@@ -2,15 +2,14 @@
setlocal enabledelayedexpansion
goto start
[case]
title=check remote interface response
cid=0
pid=0
[group]
1. Send a request to interface http://xxx
2. Retrieve sessionID field from response json
3. Validate its format >> ^[a-z0-9]{26}
1. Send a request to interface http://xxx
2. Retrieve sessionID field from response json
3. Validate its format >> ^[a-z0-9]{26}
[esac]
:start
......
#!/usr/bin/env node
/**
[case]
title=check string matches pattern
cid=0
pid=0
[group]
1. exactly match >> hello
2. regular expression match >> 1\d{10}
3. format string match >> %s%d
1. exactly match >> hello
2. regular expression match >> 1\d{10}
3. format string match >> %s%d
[esac]
*/
......@@ -18,4 +17,4 @@ pid=0
console.log(">> hello");
console.log(">> 13905120512");
console.log(">> abc123");
console.log(">> abc123");
\ No newline at end of file
#!/usr/bin/env node
/**
[case]
title=extract content from webpage
cid=0
pid=0
[group]
1. Load web page from url http://xxx
2. Retrieve img element zt-logo.png in html
3. Check img exist >> .*zt-logo.png
1. Load web page from url http://xxx
2. Retrieve img element zt-logo.png in html
3. Check img exist >> .*zt-logo.png
[esac]
*/
......@@ -30,4 +29,4 @@ http.get('http://pms.zentao.net/user-login.html', function(req) {
console.log(">>" + res[1])
});
});
});
\ No newline at end of file
#!/usr/bin/env node
/**
[case]
title=check remote interface response
cid=0
pid=0
[group]
1. Send a request to interface http://xxx
2. Retrieve sessionID field from response json
3. Validate its format >> ^[a-z0-9]{26}
1. Send a request to interface http://xxx
2. Retrieve sessionID field from response json
3. Validate its format >> ^[a-z0-9]{26}
[esac]
*/
......@@ -32,4 +31,4 @@ http.get('http://pms.zentao.net/?mode=getconfig', function(req) {
}
}
});
});
});
\ No newline at end of file
#!/usr/bin/env lua
--[[
[case]
title=check string matches pattern
cid=0
pid=0
[group]
1. exactly match >> hello
2. regular expression match >> 1\d{10}
3. format string match >> %s%d
1. exactly match >> hello
2. regular expression match >> 1\d{10}
3. format string match >> %s%d
[esac]
]]
print(">> hello");
print(">> 13905120512");
print(">> abc123");
print(">> abc123");
\ No newline at end of file
#!/usr/bin/env lua
--[[
[case]
title=extract content from webpage
cid=0
pid=0
[group]
1. Load web page from url http://xxx
2. Retrieve img element zt-logo.png in html
3. Check img exist >> .*zt-logo.png
1. Load web page from url http://xxx
2. Retrieve img element zt-logo.png in html
3. Check img exist >> .*zt-logo.png
[esac]
]]
......@@ -31,4 +30,4 @@ if c~= 200 then
else
_, _, src = string.find(body, "<img%ssrc='(.-)' .*>")
print(">>" .. src)
end
end
\ No newline at end of file
#!/usr/bin/env lua
--[[
[case]
title=check remote interface response
cid=0
pid=0
[group]
1. Send a request to interface http://xxx
2. Retrieve sessionID field from response json
3. Check its format >> ^[a-z0-9]{26}
1. Send a request to interface http://xxx
2. Retrieve sessionID field from response json
3. Check its format >> ^[a-z0-9]{26}
[esac]
]]
......
#!/usr/bin/env perl
=pod
[case]
title=check string matches pattern
cid=0
pid=0
[group]
1. exactly match >> hello
2. regular expression match >> 1\d{10}
3. format string match >> %s%d
1. exactly match >> hello
2. regular expression match >> 1\d{10}
3. format string match >> %s%d
[esac]
=cut
print ">> hello\n";
print ">> 13905120512\n";
print ">> abc123\n";
print ">> abc123\n";
\ No newline at end of file
#!/usr/bin/env perl
=pod
[case]
title=extract content from webpage
cid=0
pid=0
[group]
1. Load web page from url http://xxx
2. Retrieve img element zt-logo.png in html
3. Check img exist >> .*zt-logo.png
1. Load web page from url http://xxx
2. Retrieve img element zt-logo.png in html
3. Check img exist >> .*zt-logo.png
[esac]
=cut
......@@ -19,4 +18,4 @@ $html = get('http://pms.zentao.net/user-login.html');
if ( $html =~ /<img src='(.*?)' .*>/ ) {
print ">> $1\n";
}
}
\ No newline at end of file
#!/usr/bin/env perl
=pod
[case]
title=check remote interface response
cid=0
pid=0
[group]
1. Send a request to interface http://xxx
2. Retrieve sessionID field from response json
3. Check its format >> ^[a-z0-9]{26}
1. Send a request to interface http://xxx
2. Retrieve sessionID field from response json
3. Check its format >> ^[a-z0-9]{26}
[esac]
=cut
......@@ -19,4 +18,4 @@ $json = get('http://pms.zentao.net/?mode=getconfig');
if ( $json =~ /"sessionID":"([^"]*)"/ ) {
print ">> $1\n";
}
}
\ No newline at end of file
#!/usr/bin/env ruby
=begin
[case]
title=check string matches pattern
cid=0
pid=0
[group]
1. exactly match >> hello
2. regular expression match >> 1\d{10}
3. format string match >> %s%d
1. exactly match >> hello
2. regular expression match >> 1\d{10}
3. format string match >> %s%d
[esac]
=end
print(">> hello\n");
print(">> 13905120512\n");
print(">> abc123\n");
print(">> abc123\n");
\ No newline at end of file
#!/usr/bin/env ruby
=begin
[case]
title=extract content from webpage
cid=0
pid=0
[group]
1. Load web page from url http://xxx
2. Retrieve img element zt-logo.png in html
3. Check img exist >> .*zt-logo.png
1. Load web page from url http://xxx
2. Retrieve img element zt-logo.png in html
3. Check img exist >> .*zt-logo.png
[esac]
=end
......@@ -23,4 +22,4 @@ open(uri) do |http|
end
elem = html.match(/<img src='(.*?)' .*>/).captures
puts '>> ' + elem[0]
puts '>> ' + elem[0]
\ No newline at end of file
#!/usr/bin/env ruby
=begin
[case]
title=check remote interface response
cid=0
pid=0
[group]
1. Send a request to interface http://xxx
2. Retrieve sessionID field from response json
3. Check its format >> ^[a-z0-9]{26}
1. Send a request to interface http://xxx
2. Retrieve sessionID field from response json
3. Check its format >> ^[a-z0-9]{26}
[esac]
=end
......@@ -24,4 +23,4 @@ open(uri) do |http|
end
json = JSON.parse(html) # need json library (gem install json)
puts '>> ' + json['sessionID']
puts '>> ' + json['sessionID']
\ No newline at end of file
#!/usr/bin/env tclsh
set case {
[case]
title=check string matches pattern
cid=0
pid=0
[group]
1. exactly match >> hello
2. regular expression match >> 1\d{10}
3. format string match >> %s%d
1. exactly match >> hello
2. regular expression match >> 1\d{10}
3. format string match >> %s%d
[esac]
}
puts ">> hello"
puts ">> 13905120512"
puts ">> abc123"
puts ">> abc123"
\ No newline at end of file
#!/usr/bin/env tclsh
set case {
[case]
title=extract content from webpage
cid=0
pid=0
[group]
1. Load web page from url http://xxx
2. Retrieve img element zt-logo.png in html
3. Check img exist >> .*zt-logo.png
1. Load web page from url http://xxx
2. Retrieve img element zt-logo.png in html
3. Check img exist >> .*zt-logo.png
[esac]
}
......@@ -22,4 +21,4 @@ set http [::http::geturl $url]
set html [::http::data $http]
regexp -- {<img src='(.*?)' .*>} $html match elem
puts ">> $elem"
puts ">> $elem"
\ No newline at end of file
#!/usr/bin/env tclsh
set case {
[case]
title=check remote interface response
cid=0
pid=0
[group]
1. Send a request to interface http://xxx
2. Retrieve sessionID field from response json
3. Check its format >> ^[a-z0-9]{26}
1. Send a request to interface http://xxx
2. Retrieve sessionID field from response json
3. Check its format >> ^[a-z0-9]{26}
[esac]
}
......@@ -24,4 +23,4 @@ set jsonStr [::http::data $http]
# need json library, you may use ActiveTcl
set jsonObj [json::json2dict $jsonStr]
puts ">> [dict get $jsonObj sessionID]"
puts ">> [dict get $jsonObj sessionID]"
\ No newline at end of file
......@@ -125,7 +125,7 @@ func runCases(files []string) {
ext = ext[1:]
}
lang := vari.ScriptExtToNameMap[ext]
if commonUtils.GetFieldVal(conf, stringUtils.Ucfirst(lang)) == "" { // filter by interpreter
if lang != "bat" && commonUtils.GetFieldVal(conf, stringUtils.Ucfirst(lang)) == "" { // filter by interpreter
continue
}
} else if !commonUtils.IsWin() { // filter by os
......
......@@ -15,6 +15,10 @@ import (
)
func Report(report model.TestReport, pathMaxWidth int) {
if len(report.Cases) == 0 {
return
}
// print failed case
failedCount := 0
failedCaseLines := make([]string, 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册