khfaraaz82@gmail.com | c526fe9 | 2012-08-10 22:09:13 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Testcase Name : matches03.aql |
| 3 | * Description : Positive tests |
| 4 | * : Test matches functions with regular expressions as third input parameter |
| 5 | * Success : Yes |
| 6 | * Date : 23th April 2012 |
| 7 | */ |
| 8 | |
| 9 | |
| 10 | write output to nc1:"rttest/string_matches03.adm"; |
| 11 | |
| 12 | for $a in [matches("1234567890","[^a-z]"), |
| 13 | matches("1234567890","[^a-zA-Z]"), |
| 14 | matches("abcdefghABCDEFGH","[^a-zA-Z]"), |
| 15 | matches("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ","[^a-zA-Z]"), |
| 16 | matches("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ","[^A-Z]"), |
| 17 | matches("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ","[^a-z]"), |
| 18 | matches("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ","[^0-9]"), |
| 19 | matches("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ","[0-9]"), |
| 20 | matches("adefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ","[a-z&&[^bc]]"), |
| 21 | matches("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ","[a-z&&[^bc]]"), |
| 22 | matches("bc","[a-z&&[^bc]]"), |
| 23 | matches("mnop","[a-z&&[^m-p]]"), |
| 24 | matches("abcdmnop","[a-z&&[^m-p]]")] |
| 25 | return $a |
| 26 | |