Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update unicode test dat files for runtime language levels #5066

Merged
merged 1 commit into from
Feb 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
}
6 changes: 3 additions & 3 deletions tests/dat/actions/unicode.tests/python.txt
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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}
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
}
}