khfaraaz82@gmail.com | c526fe9 | 2012-08-10 22:09:13 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Test case Name : toLowerCas03.aql |
| 3 | * Description : Test lowercase(string) function |
| 4 | * : This test case covers Positive tests |
| 5 | * Success : Yes |
| 6 | * Date : 19th April 2012 |
| 7 | */ |
| 8 | |
| 9 | |
| 10 | // Create internal dataset, insert string data and pass the string attribute to lowercase function, and verify results. |
| 11 | |
| 12 | drop dataverse test if exists; |
| 13 | create dataverse test; |
| 14 | use dataverse test; |
| 15 | |
| 16 | create type TestType as { |
| 17 | name:string |
| 18 | } |
| 19 | |
| 20 | create dataset testds(TestType) partitioned by key name; |
| 21 | |
| 22 | insert into dataset testds({"name":"Maradona"}); |
| 23 | insert into dataset testds({"name":"Pele"}); |
| 24 | insert into dataset testds({"name":"Roberto Baggio"}); |
| 25 | insert into dataset testds({"name":"Beckham David"}); |
| 26 | insert into dataset testds({"name":"Rooney"}); |
| 27 | insert into dataset testds({"name":"Ronaldinho"}); |
| 28 | insert into dataset testds({"name":"Ronaldo"}); |
| 29 | insert into dataset testds({"name":"Zinadine Zidane"}); |
| 30 | insert into dataset testds({"name":"Cristiano Ronaldo"}); |
| 31 | insert into dataset testds({"name":"Messi"}); |
| 32 | insert into dataset testds({"name":"Tevez"}); |
| 33 | insert into dataset testds({"name":"Henry"}); |
| 34 | |
| 35 | write output to nc1:"rttest/string_toLowerCase03.adm"; |
| 36 | |
| 37 | for $l in dataset('testds') |
| 38 | order by $l.name |
| 39 | return lowercase($l.name) |