Skip to content

Commit

Permalink
Modify unicode tests file name (#3865)
Browse files Browse the repository at this point in the history
The special character `:` is not valid in windows.
So it is necessary to modify it to `-`.
  • Loading branch information
ningyougang authored and rabbah committed Jul 10, 2018
1 parent 223a168 commit 171bfb5
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/actions-new.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ The standard test action is shown below in JavaScript. It should be adapted for
new language and added to the [test artifacts directory](../tests/dat/actions/unicode.tests)
with the name `<runtime-kind>.txt` for plain text file or `<runtime-kind>.bin` for a
a binary file. The `<runtime-kind>` must match the value used for `kind` in the corresponding
runtime manifest entry.
runtime manifest entry, replacing `:` in the kind with a `-`.
For example, a plain text function for `nodejs:8` becomes `nodejs-8.txt`.

```js
function main(args) {
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/src/test/scala/system/basic/WskUnicodeTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class WskUnicodeTests extends TestHelpers with WskTestHelpers with JsHelpers wit
def getFileLocation(kind: String): Option[String] = {
// the test file is either named kind.txt or kind.bin
// one of the two must exist otherwise, fail the test.
val prefix = "unicode.tests" + File.separator + kind
val prefix = "unicode.tests" + File.separator + kind.replace(":", "-")
val txt = new File(TestUtils.getTestActionFilename(s"$prefix.txt"))
val bin = new File(TestUtils.getTestActionFilename(s"$prefix.bin"))
if (txt.exists) Some(txt.toString)
Expand Down

0 comments on commit 171bfb5

Please sign in to comment.