forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEvalWordOffset.test
More file actions
34 lines (24 loc) · 790 Bytes
/
EvalWordOffset.test
File metadata and controls
34 lines (24 loc) · 790 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
setup
local tWords
put "abc def ""e&"ghi jkl""e&" " into tWords
put tWords after tWords
test wordOffset("g", tWords) is 3
test wordOffset("def", tWords) is 2
test wordOffset("x", tWords) is 0
test wordOffset("ABC", tWords) is 1
test wordOffset("def", tWords, 1) is 1
test wordOffset("def", tWords, 2) is 3
test wordOffset("def", tWords, 5) is 0
set the wholematches to true
test wordOffset("g", tWords) is 0
test wordOffset(quote&"ghi jkl""e, tWords) is 3
set the wholematches to false
set the caseSensitive to true
test wordOffset("ab", tWords) is 1
test wordOffset("AB", tWords) is 0
set the wholematches to true
test wordOffset("ab", tWords) is 0
test wordOffset("AB", tWords) is 0
test wordOffset("abc", tWords) is 1
test wordOffset("ABC", tWords) is 0
teardown