diff --git a/tests/dat/actions/unicode.tests/go-1.11.txt b/tests/dat/actions/unicode.tests/go-1.13.txt similarity index 100% rename from tests/dat/actions/unicode.tests/go-1.11.txt rename to tests/dat/actions/unicode.tests/go-1.13.txt diff --git a/tests/dat/actions/unicode.tests/python-2.txt b/tests/dat/actions/unicode.tests/go-1.15.txt similarity index 75% rename from tests/dat/actions/unicode.tests/python-2.txt rename to tests/dat/actions/unicode.tests/go-1.15.txt index 8ef252f4fbe..0419947fe4e 100644 --- a/tests/dat/actions/unicode.tests/python-2.txt +++ b/tests/dat/actions/unicode.tests/go-1.15.txt @@ -1,4 +1,3 @@ -"""Python 2 Unicode test. /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -15,10 +14,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -""" -def main(args): - sep = args['delimiter'] - str = sep + " ☃ ".decode('utf-8') + sep - print(str.encode('utf-8')) - return {"winter": str} +package main + +import "fmt" + +func Main(args map[string]interface{}) map[string]interface{} { + delimiter := args["delimiter"].(string) + str := delimiter + " ☃ " + delimiter + fmt.Println(str) + res := make(map[string]interface{}) + res["winter"] = str + return res +} diff --git a/tests/dat/actions/unicode.tests/python.txt b/tests/dat/actions/unicode.tests/python.txt index 8ef252f4fbe..d416171e223 100644 --- a/tests/dat/actions/unicode.tests/python.txt +++ b/tests/dat/actions/unicode.tests/python.txt @@ -1,4 +1,4 @@ -"""Python 2 Unicode test. +"""Python 3 Unicode test. /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -19,6 +19,6 @@ def main(args): sep = args['delimiter'] - str = sep + " ☃ ".decode('utf-8') + sep - print(str.encode('utf-8')) + str = sep + " ☃ " + sep + print(str) return {"winter": str} diff --git a/tests/dat/actions/unicode.tests/nodejs-6.txt b/tests/dat/actions/unicode.tests/swift-5.1.txt similarity index 76% rename from tests/dat/actions/unicode.tests/nodejs-6.txt rename to tests/dat/actions/unicode.tests/swift-5.1.txt index a14319c9f07..aff9c50a2dd 100644 --- a/tests/dat/actions/unicode.tests/nodejs-6.txt +++ b/tests/dat/actions/unicode.tests/swift-5.1.txt @@ -15,8 +15,12 @@ * limitations under the License. */ -function main(args) { - var str = args.delimiter + " ☃ " + args.delimiter; - console.log(str); - return { "winter": str }; +func main(args: [String:Any]) -> [String:Any] { + if let str = args["delimiter"] as? String { + let msg = "\(str) ☃ \(str)" + print(msg) + return [ "winter" : msg ] + } else { + return [ "error" : "no delimiter" ] + } } diff --git a/tests/dat/actions/unicode.tests/nodejs-8.txt b/tests/dat/actions/unicode.tests/swift-5.3.txt similarity index 76% rename from tests/dat/actions/unicode.tests/nodejs-8.txt rename to tests/dat/actions/unicode.tests/swift-5.3.txt index a14319c9f07..aff9c50a2dd 100644 --- a/tests/dat/actions/unicode.tests/nodejs-8.txt +++ b/tests/dat/actions/unicode.tests/swift-5.3.txt @@ -15,8 +15,12 @@ * limitations under the License. */ -function main(args) { - var str = args.delimiter + " ☃ " + args.delimiter; - console.log(str); - return { "winter": str }; +func main(args: [String:Any]) -> [String:Any] { + if let str = args["delimiter"] as? String { + let msg = "\(str) ☃ \(str)" + print(msg) + return [ "winter" : msg ] + } else { + return [ "error" : "no delimiter" ] + } }