Repository: tapestry-5 Updated Branches: refs/heads/master 004a1e8e1 -> 85a7f9846
TAP5-2365: use a classpath resource for the test instead of creating a temp file Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/85a7f984 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/85a7f984 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/85a7f984 Branch: refs/heads/master Commit: 85a7f9846939e64f0bbb483797a59eae240cdf8a Parents: 004a1e8 Author: Jochen Kemnade <jochen.kemn...@eddyson.de> Authored: Thu Aug 28 10:33:23 2014 +0200 Committer: Jochen Kemnade <jochen.kemn...@eddyson.de> Committed: Thu Aug 28 10:33:23 2014 +0200 ---------------------------------------------------------------------- .../internal/plastic/PlasticUtilsTests.groovy | 16 +++++++--------- plastic/src/test/resources/webapp##01.test | 0 2 files changed, 7 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/85a7f984/plastic/src/test/groovy/org/apache/tapestry5/internal/plastic/PlasticUtilsTests.groovy ---------------------------------------------------------------------- diff --git a/plastic/src/test/groovy/org/apache/tapestry5/internal/plastic/PlasticUtilsTests.groovy b/plastic/src/test/groovy/org/apache/tapestry5/internal/plastic/PlasticUtilsTests.groovy index 5e1e3d0..8a2f4ea 100644 --- a/plastic/src/test/groovy/org/apache/tapestry5/internal/plastic/PlasticUtilsTests.groovy +++ b/plastic/src/test/groovy/org/apache/tapestry5/internal/plastic/PlasticUtilsTests.groovy @@ -2,6 +2,7 @@ package org.apache.tapestry5.internal.plastic import org.apache.tapestry5.plastic.PlasticUtils +import spock.lang.Issue import spock.lang.Specification import spock.lang.Unroll @@ -23,15 +24,12 @@ class PlasticUtilsTests extends Specification "java.lang.Long[][]" | "[[Ljava/lang/Long;" } - def "Do not urlencode file paths"() - { - URL url = getClass().getClassLoader().getResource("."); - File file = new File(new File(url.toURI()), "webapp##01.test"); - file.createNewFile(); - file.deleteOnExit(); - expect: - PlasticInternalUtils.getStreamForPath(getClass().classLoader, file.getAbsolutePath().substring(new File(url.toURI()).getAbsolutePath().length() + 1) ) != null - } + @Issue(['TAP5-1995', 'TAP5-2365']) + def "Do not urlencode file paths"() + { + expect: + PlasticInternalUtils.getStreamForPath(getClass().classLoader, 'webapp##01.test') != null + } def "Descriptor #descriptor as class name should be #className"() { http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/85a7f984/plastic/src/test/resources/webapp##01.test ---------------------------------------------------------------------- diff --git a/plastic/src/test/resources/webapp##01.test b/plastic/src/test/resources/webapp##01.test new file mode 100644 index 0000000..e69de29