Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
91ce0dd6
Commit
91ce0dd6
authored
Jul 12, 2009
by
Piotr Caban
Committed by
Alexandre Julliard
Jul 13, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Fix String_match implementation.
parent
df819566
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
8 deletions
+19
-8
string.c
dlls/jscript/string.c
+6
-3
regexp.js
dlls/jscript/tests/regexp.js
+13
-5
No files found.
dlls/jscript/string.c
View file @
91ce0dd6
...
@@ -596,9 +596,12 @@ static HRESULT String_match(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAM
...
@@ -596,9 +596,12 @@ static HRESULT String_match(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAM
TRACE
(
"
\n
"
);
TRACE
(
"
\n
"
);
if
(
arg_cnt
(
dp
)
!=
1
)
{
if
(
!
arg_cnt
(
dp
))
{
FIXME
(
"unsupported args
\n
"
);
if
(
retv
)
{
return
E_NOTIMPL
;
V_VT
(
retv
)
=
VT_NULL
;
}
return
S_OK
;
}
}
arg_var
=
get_arg
(
dp
,
0
);
arg_var
=
get_arg
(
dp
,
0
);
...
...
dlls/jscript/tests/regexp.js
View file @
91ce0dd6
...
@@ -31,7 +31,7 @@ ok(m["0"] === "ab", "m[0] is not \"ab\"");
...
@@ -31,7 +31,7 @@ ok(m["0"] === "ab", "m[0] is not \"ab\"");
m
=
"abcabc"
.
match
(
/ab/g
);
m
=
"abcabc"
.
match
(
/ab/g
);
ok
(
typeof
(
m
)
===
"object"
,
"typeof m is not object"
);
ok
(
typeof
(
m
)
===
"object"
,
"typeof m is not object"
);
ok
(
m
.
length
===
2
,
"m.length is not
1
"
);
ok
(
m
.
length
===
2
,
"m.length is not
2
"
);
ok
(
m
[
"0"
]
===
"ab"
,
"m[0] is not
\"
ab
\"
"
);
ok
(
m
[
"0"
]
===
"ab"
,
"m[0] is not
\"
ab
\"
"
);
ok
(
m
[
"1"
]
===
"ab"
,
"m[1] is not
\"
ab
\"
"
);
ok
(
m
[
"1"
]
===
"ab"
,
"m[1] is not
\"
ab
\"
"
);
...
@@ -41,7 +41,7 @@ ok(m === null, "m is not null");
...
@@ -41,7 +41,7 @@ ok(m === null, "m is not null");
m
=
"abcabc"
.
match
(
/Ab/gi
);
m
=
"abcabc"
.
match
(
/Ab/gi
);
ok
(
typeof
(
m
)
===
"object"
,
"typeof m is not object"
);
ok
(
typeof
(
m
)
===
"object"
,
"typeof m is not object"
);
ok
(
m
.
length
===
2
,
"m.length is not
1
"
);
ok
(
m
.
length
===
2
,
"m.length is not
2
"
);
ok
(
m
[
"0"
]
===
"ab"
,
"m[0] is not
\"
ab
\"
"
);
ok
(
m
[
"0"
]
===
"ab"
,
"m[0] is not
\"
ab
\"
"
);
ok
(
m
[
"1"
]
===
"ab"
,
"m[1] is not
\"
ab
\"
"
);
ok
(
m
[
"1"
]
===
"ab"
,
"m[1] is not
\"
ab
\"
"
);
...
@@ -64,22 +64,30 @@ ok(m["0"] === "ab", "m[0] is not \"ab\"");
...
@@ -64,22 +64,30 @@ ok(m["0"] === "ab", "m[0] is not \"ab\"");
m
=
"abcabc"
.
match
(
new
RegExp
(
"ab"
,
"g"
));
m
=
"abcabc"
.
match
(
new
RegExp
(
"ab"
,
"g"
));
ok
(
typeof
(
m
)
===
"object"
,
"typeof m is not object"
);
ok
(
typeof
(
m
)
===
"object"
,
"typeof m is not object"
);
ok
(
m
.
length
===
2
,
"m.length is not
1
"
);
ok
(
m
.
length
===
2
,
"m.length is not
2
"
);
ok
(
m
[
"0"
]
===
"ab"
,
"m[0] is not
\"
ab
\"
"
);
ok
(
m
[
"0"
]
===
"ab"
,
"m[0] is not
\"
ab
\"
"
);
ok
(
m
[
"1"
]
===
"ab"
,
"m[1] is not
\"
ab
\"
"
);
ok
(
m
[
"1"
]
===
"ab"
,
"m[1] is not
\"
ab
\"
"
);
m
=
"abcabc"
.
match
(
new
RegExp
(
/ab/g
));
m
=
"abcabc"
.
match
(
new
RegExp
(
/ab/g
));
ok
(
typeof
(
m
)
===
"object"
,
"typeof m is not object"
);
ok
(
typeof
(
m
)
===
"object"
,
"typeof m is not object"
);
ok
(
m
.
length
===
2
,
"m.length is not
1
"
);
ok
(
m
.
length
===
2
,
"m.length is not
2
"
);
ok
(
m
[
"0"
]
===
"ab"
,
"m[0] is not
\"
ab
\"
"
);
ok
(
m
[
"0"
]
===
"ab"
,
"m[0] is not
\"
ab
\"
"
);
ok
(
m
[
"1"
]
===
"ab"
,
"m[1] is not
\"
ab
\"
"
);
ok
(
m
[
"1"
]
===
"ab"
,
"m[1] is not
\"
ab
\"
"
);
m
=
"abcabc"
.
match
(
new
RegExp
(
"ab"
,
"g"
,
"test"
));
m
=
"abcabc"
.
match
(
new
RegExp
(
"ab"
,
"g"
,
"test"
));
ok
(
typeof
(
m
)
===
"object"
,
"typeof m is not object"
);
ok
(
typeof
(
m
)
===
"object"
,
"typeof m is not object"
);
ok
(
m
.
length
===
2
,
"m.length is not
1
"
);
ok
(
m
.
length
===
2
,
"m.length is not
2
"
);
ok
(
m
[
"0"
]
===
"ab"
,
"m[0] is not
\"
ab
\"
"
);
ok
(
m
[
"0"
]
===
"ab"
,
"m[0] is not
\"
ab
\"
"
);
ok
(
m
[
"1"
]
===
"ab"
,
"m[1] is not
\"
ab
\"
"
);
ok
(
m
[
"1"
]
===
"ab"
,
"m[1] is not
\"
ab
\"
"
);
m
=
"abcabcg"
.
match
(
"ab"
,
"g"
);
ok
(
typeof
(
m
)
===
"object"
,
"typeof m is not object"
);
ok
(
m
.
length
===
1
,
"m.length is not 1"
);
ok
(
m
[
"0"
]
===
"ab"
,
"m[0] is not
\"
ab
\"
"
);
m
=
"abcabc"
.
match
();
ok
(
m
===
null
,
"m is not null"
);
r
=
"- [test] -"
.
replace
(
/
\[([^\[]
+
)\]
/g
,
"success"
);
r
=
"- [test] -"
.
replace
(
/
\[([^\[]
+
)\]
/g
,
"success"
);
ok
(
r
===
"- success -"
,
"r = "
+
r
+
" expected '- success -'"
);
ok
(
r
===
"- success -"
,
"r = "
+
r
+
" expected '- success -'"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment