openwhisk-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rab...@apache.org
Subject [incubator-openwhisk] branch master updated: Modify unicode tests file name (#3865)
Date Tue, 10 Jul 2018 07:14:21 GMT
This is an automated email from the ASF dual-hosted git repository.

rabbah pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git


The following commit(s) were added to refs/heads/master by this push:
     new 171bfb5  Modify unicode tests file name (#3865)
171bfb5 is described below

commit 171bfb5761cdd4758525837f98bbf998c619ccec
Author: ningyougang <415622920@qq.com>
AuthorDate: Tue Jul 10 15:14:18 2018 +0800

    Modify unicode tests file name (#3865)
    
    The special character `:` is not valid in windows.
    So it is necessary to modify it to `-`.
---
 docs/actions-new.md                                                | 3 ++-
 tests/dat/actions/unicode.tests/{nodejs:8.txt => nodejs-6.txt}     | 0
 tests/dat/actions/unicode.tests/{nodejs:6.txt => nodejs-8.txt}     | 0
 tests/dat/actions/unicode.tests/{php:7.2.txt => php-7.1.txt}       | 0
 tests/dat/actions/unicode.tests/{php:7.1.txt => php-7.2.txt}       | 0
 tests/dat/actions/unicode.tests/{python:2.txt => python-2.txt}     | 0
 tests/dat/actions/unicode.tests/{python:3.txt => python-3.txt}     | 0
 tests/dat/actions/unicode.tests/{swift:4.1.txt => swift-3.1.1.txt} | 0
 tests/dat/actions/unicode.tests/{swift:3.1.1.txt => swift-4.1.txt} | 0
 tests/src/test/scala/system/basic/WskUnicodeTests.scala            | 2 +-
 10 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/docs/actions-new.md b/docs/actions-new.md
index c7945d1..91704d7 100644
--- a/docs/actions-new.md
+++ b/docs/actions-new.md
@@ -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) {
diff --git a/tests/dat/actions/unicode.tests/nodejs:8.txt b/tests/dat/actions/unicode.tests/nodejs-6.txt
similarity index 100%
rename from tests/dat/actions/unicode.tests/nodejs:8.txt
rename to tests/dat/actions/unicode.tests/nodejs-6.txt
diff --git a/tests/dat/actions/unicode.tests/nodejs:6.txt b/tests/dat/actions/unicode.tests/nodejs-8.txt
similarity index 100%
rename from tests/dat/actions/unicode.tests/nodejs:6.txt
rename to tests/dat/actions/unicode.tests/nodejs-8.txt
diff --git a/tests/dat/actions/unicode.tests/php:7.2.txt b/tests/dat/actions/unicode.tests/php-7.1.txt
similarity index 100%
rename from tests/dat/actions/unicode.tests/php:7.2.txt
rename to tests/dat/actions/unicode.tests/php-7.1.txt
diff --git a/tests/dat/actions/unicode.tests/php:7.1.txt b/tests/dat/actions/unicode.tests/php-7.2.txt
similarity index 100%
rename from tests/dat/actions/unicode.tests/php:7.1.txt
rename to tests/dat/actions/unicode.tests/php-7.2.txt
diff --git a/tests/dat/actions/unicode.tests/python:2.txt b/tests/dat/actions/unicode.tests/python-2.txt
similarity index 100%
rename from tests/dat/actions/unicode.tests/python:2.txt
rename to tests/dat/actions/unicode.tests/python-2.txt
diff --git a/tests/dat/actions/unicode.tests/python:3.txt b/tests/dat/actions/unicode.tests/python-3.txt
similarity index 100%
rename from tests/dat/actions/unicode.tests/python:3.txt
rename to tests/dat/actions/unicode.tests/python-3.txt
diff --git a/tests/dat/actions/unicode.tests/swift:4.1.txt b/tests/dat/actions/unicode.tests/swift-3.1.1.txt
similarity index 100%
rename from tests/dat/actions/unicode.tests/swift:4.1.txt
rename to tests/dat/actions/unicode.tests/swift-3.1.1.txt
diff --git a/tests/dat/actions/unicode.tests/swift:3.1.1.txt b/tests/dat/actions/unicode.tests/swift-4.1.txt
similarity index 100%
rename from tests/dat/actions/unicode.tests/swift:3.1.1.txt
rename to tests/dat/actions/unicode.tests/swift-4.1.txt
diff --git a/tests/src/test/scala/system/basic/WskUnicodeTests.scala b/tests/src/test/scala/system/basic/WskUnicodeTests.scala
index f425418..1000bc6 100644
--- a/tests/src/test/scala/system/basic/WskUnicodeTests.scala
+++ b/tests/src/test/scala/system/basic/WskUnicodeTests.scala
@@ -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)


Mime
View raw message