File tree Expand file tree Collapse file tree 5 files changed +31
-18
lines changed
tests/dat/actions/unicode.tests Expand file tree Collapse file tree 5 files changed +31
-18
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 1- """Python 2 Unicode test.
21/*
32 * Licensed to the Apache Software Foundation (ASF) under one or more
43 * contributor license agreements. See the NOTICE file distributed with
1514 * See the License for the specific language governing permissions and
1615 * limitations under the License.
1716 */
18- """
1917
20- def main(args):
21- sep = args['delimiter']
22- str = sep + " ☃ ".decode('utf-8') + sep
23- print(str.encode('utf-8'))
24- return {"winter": str}
18+ package main
19+
20+ import "fmt"
21+
22+ func Main(args map[string]interface{}) map[string]interface{} {
23+ delimiter := args["delimiter"].(string)
24+ str := delimiter + " ☃ " + delimiter
25+ fmt.Println(str)
26+ res := make(map[string]interface{})
27+ res["winter"] = str
28+ return res
29+ }
Original file line number Diff line number Diff line change 1- """Python 2 Unicode test.
1+ """Python 3 Unicode test.
22/*
33 * Licensed to the Apache Software Foundation (ASF) under one or more
44 * contributor license agreements. See the NOTICE file distributed with
1919
2020def main(args):
2121 sep = args['delimiter']
22- str = sep + " ☃ ".decode('utf-8') + sep
23- print(str.encode('utf-8') )
22+ str = sep + " ☃ " + sep
23+ print(str)
2424 return {"winter": str}
Original file line number Diff line number Diff line change 1515 * limitations under the License.
1616 */
1717
18- function main(args) {
19- var str = args.delimiter + " ☃ " + args.delimiter;
20- console.log(str);
21- return { "winter": str };
18+ func main(args: [String:Any]) -> [String:Any] {
19+ if let str = args["delimiter"] as? String {
20+ let msg = "\(str) ☃ \(str)"
21+ print(msg)
22+ return [ "winter" : msg ]
23+ } else {
24+ return [ "error" : "no delimiter" ]
25+ }
2226}
Original file line number Diff line number Diff line change 1515 * limitations under the License.
1616 */
1717
18- function main(args) {
19- var str = args.delimiter + " ☃ " + args.delimiter;
20- console.log(str);
21- return { "winter": str };
18+ func main(args: [String:Any]) -> [String:Any] {
19+ if let str = args["delimiter"] as? String {
20+ let msg = "\(str) ☃ \(str)"
21+ print(msg)
22+ return [ "winter" : msg ]
23+ } else {
24+ return [ "error" : "no delimiter" ]
25+ }
2226}
You can’t perform that action at this time.
0 commit comments