2005-03-23 Ritvik Mayank <mritvik@novell.com>
[mono.git] / mcs / mbas / Test / tests / LikeOperator.vb
1 Imports System
2
3 Module LikeOperator
4     Sub main()
5
6         Dim a As Boolean
7
8         a = "HELLO" Like "HELLO"
9         If a <> True Then
10             Console.WriteLine("#A1-LikeOperator:Failed")
11         End If
12
13         a = "HELLO" Like "HEllO"
14         If a <> False Then
15             Console.WriteLine("#A2-LikeOperator:Failed")
16         End If
17
18         a = "HELLO" Like "H*O"
19         If a <> True Then
20             Console.WriteLine("#A3-LikeOperator:Failed")
21         End If
22
23         a = "HELLO" Like "H[A-Z][!M-P][!A-K]O"
24         If a <> True Then
25             Console.WriteLine("#A4-LikeOperator:Failed")
26         End If
27
28         a = "HE12O" Like "H?##[L-P]"
29         If a <> True Then
30             Console.WriteLine("#A5-LikeOperator:Failed")
31         End If
32
33         a = "HELLO123WORLD" Like "H?*#*"
34         If a <> True Then
35             Console.WriteLine("#A6-LikeOperator:Failed")
36         End If
37
38         a = "HELLOworld" Like "B*O*d"
39         If a <> False Then
40             Console.WriteLine("#A7-LikeOperator:Failed")
41         End If
42
43         a = "" Like ""
44         If a <> True Then
45             Console.WriteLine("#A8-LikeOperator:Failed")
46         End If
47
48         a = "A" Like ""
49         If a <> False Then
50             Console.WriteLine("#A9-LikeOperator:Failed")
51         End If
52
53         a = "" Like "A"
54         If a <> False Then
55             Console.WriteLine("#A10-LikeOperator:Failed")
56         End If
57
58         a = "HELLO" Like "HELLO" & Nothing
59         If a <> True Then
60             Console.WriteLine("#A11-LikeOperator:Failed")
61         End If
62
63
64     End Sub
65
66 End Module