diff options
author | michelou <michelou@epfl.ch> | 2008-02-15 11:30:46 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2008-02-15 11:30:46 +0000 |
commit | e1ffc05b10be619d36150a27a1d9ccdc72b99e8d (patch) | |
tree | 1f400dbe6ffa02bef36503f45717a4fcb4b685af /test/files | |
parent | fa3861528dab4b304b4f74e507af5f40a59705e4 (diff) | |
download | scala-e1ffc05b10be619d36150a27a1d9ccdc72b99e8d.tar.gz scala-e1ffc05b10be619d36150a27a1d9ccdc72b99e8d.tar.bz2 scala-e1ffc05b10be619d36150a27a1d9ccdc72b99e8d.zip |
fixed #486
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/t0486.check | 8 | ||||
-rw-r--r-- | test/files/run/t0486.scala | 24 |
2 files changed, 32 insertions, 0 deletions
diff --git a/test/files/run/t0486.check b/test/files/run/t0486.check new file mode 100644 index 0000000000..dd1ec28223 --- /dev/null +++ b/test/files/run/t0486.check @@ -0,0 +1,8 @@ +<wsdl:definitions name="service1" xmlns:tns="target1"> + </wsdl:definitions> +<wsdl:definitions name="service2" xmlns:tns="target2"> + </wsdl:definitions> +<wsdl:definitions name="service3" xmlns:tns="target3"> + </wsdl:definitions> +<wsdl:definitions name="service4" xmlns:tns="target4"> + </wsdl:definitions> diff --git a/test/files/run/t0486.scala b/test/files/run/t0486.scala new file mode 100644 index 0000000000..9cedecc095 --- /dev/null +++ b/test/files/run/t0486.scala @@ -0,0 +1,24 @@ +object Test extends Application { + import scala.xml._ + + def wsdlTemplate1(serviceName: String): Node = + <wsdl:definitions name={serviceName} xmlns:tns = { "target1" } > + </wsdl:definitions>; + + def wsdlTemplate2(serviceName: String, targetNamespace: String): Node = + <wsdl:definitions name={serviceName} xmlns:tns = { targetNamespace } > + </wsdl:definitions>; + + def wsdlTemplate3(serviceName: String): Node = + <wsdl:definitions name={serviceName} xmlns:tns = { Text("target3") } > + </wsdl:definitions>; + + def wsdlTemplate4(serviceName: String, targetNamespace: () => String): Node = + <wsdl:definitions name={serviceName} xmlns:tns = { targetNamespace() } > + </wsdl:definitions>; + + println(wsdlTemplate1("service1")) + println(wsdlTemplate2("service2", "target2")) + println(wsdlTemplate3("service3")) + println(wsdlTemplate4("service4", () => "target4")) +} |