From c89c9537966b686ff814bce638ad4d06dd7bd7bb Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Tue, 13 Apr 2010 22:54:25 +0000 Subject: Disabled failing json test. --- test/files/run/json.scala | 158 ------------------------------------- test/files/run/json.scala.disabled | 158 +++++++++++++++++++++++++++++++++++++ 2 files changed, 158 insertions(+), 158 deletions(-) delete mode 100644 test/files/run/json.scala create mode 100644 test/files/run/json.scala.disabled (limited to 'test/files') diff --git a/test/files/run/json.scala b/test/files/run/json.scala deleted file mode 100644 index ec0bad7ebe..0000000000 --- a/test/files/run/json.scala +++ /dev/null @@ -1,158 +0,0 @@ -import scala.util.parsing.json._ - -object Test extends Application { - def printJSON(s: String) { - println(JSON parse s) - } - printJSON("{\"name\": \"value\"}") - printJSON("{\"name\": \"va1ue\"}") // ticket #136 - printJSON("{\"name\": { \"name1\": \"va1ue1\", \"name2\": \"va1ue2\" } }") - printJSON("{\"name\": \"\\u0022\"}") - printJSON("{\"age\": 0}") - println - - // from http://en.wikipedia.org/wiki/JSON - val sample1 = """ -{ - "firstName": "John", - "lastName": "Smith", - "address": { - "streetAddress": "21 2nd Street", - "city": "New York", - "state": "NY", - "postalCode": 10021 - }, - "phoneNumbers": [ - "212 732-1234", - "646 123-4567" - ] -}""" - //println(sample1) - printJSON(sample1) - println - - // from http://www.developer.com/lang/jscript/article.php/3596836 - val sample2 = """ -{ - "fullname": "Sean Kelly", - "org": "SK Consulting", - "emailaddrs": [ - {"type": "work", "value": "kelly@seankelly.biz"}, - {"type": "home", "pref": 1, "value": "kelly@seankelly.tv"} - ], - "telephones": [ - {"type": "work", "pref": 1, "value": "+1 214 555 1212"}, - {"type": "fax", "value": "+1 214 555 1213"}, - {"type": "mobile", "value": "+1 214 555 1214"} - ], - "addresses": [ - {"type": "work", "format": "us", - "value": "1234 Main StnSpringfield, TX 78080-1216"}, - {"type": "home", "format": "us", - "value": "5678 Main StnSpringfield, TX 78080-1316"} - ], - "urls": [ - {"type": "work", "value": "http://seankelly.biz/"}, - {"type": "home", "value": "http://seankelly.tv/"} - ] -}""" - //println(sample2) - printJSON(sample2) - println - - // from http://json.org/example.html - val sample3 = """ -{"web-app": { - "servlet": [ - { - "servlet-name": "cofaxCDS", - "servlet-class": "org.cofax.cds.CDSServlet", - "init-param": { - "configGlossary:installationAt": "Philadelphia, PA", - "configGlossary:adminEmail": "ksm@pobox.com", - "configGlossary:poweredBy": "Cofax", - "configGlossary:poweredByIcon": "/images/cofax.gif", - "configGlossary:staticPath": "/content/static", - "templateProcessorClass": "org.cofax.WysiwygTemplate", - "templateLoaderClass": "org.cofax.FilesTemplateLoader", - "templatePath": "templates", - "templateOverridePath": "", - "defaultListTemplate": "listTemplate.htm", - "defaultFileTemplate": "articleTemplate.htm", - "useJSP": false, - "jspListTemplate": "listTemplate.jsp", - "jspFileTemplate": "articleTemplate.jsp", - "cachePackageTagsTrack": 200, - "cachePackageTagsStore": 200, - "cachePackageTagsRefresh": 60, - "cacheTemplatesTrack": 100, - "cacheTemplatesStore": 50, - "cacheTemplatesRefresh": 15, - "cachePagesTrack": 200, - "cachePagesStore": 100, - "cachePagesRefresh": 10, - "cachePagesDirtyRead": 10, - "searchEngineListTemplate": "forSearchEnginesList.htm", - "searchEngineFileTemplate": "forSearchEngines.htm", - "searchEngineRobotsDb": "WEB-INF/robots.db", - "useDataStore": true, - "dataStoreClass": "org.cofax.SqlDataStore", - "redirectionClass": "org.cofax.SqlRedirection", - "dataStoreName": "cofax", - "dataStoreDriver": "com.microsoft.jdbc.sqlserver.SQLServerDriver", - "dataStoreUrl": "jdbc:microsoft:sqlserver://LOCALHOST:1433;DatabaseName=goon", - "dataStoreUser": "sa", - "dataStorePassword": "dataStoreTestQuery", - "dataStoreTestQuery": "SET NOCOUNT ON;select test='test';", - "dataStoreLogFile": "/usr/local/tomcat/logs/datastore.log", - "dataStoreInitConns": 10, - "dataStoreMaxConns": 100, - "dataStoreConnUsageLimit": 100, - "dataStoreLogLevel": "debug", - "maxUrlLength": 500}}, - { - "servlet-name": "cofaxEmail", - "servlet-class": "org.cofax.cds.EmailServlet", - "init-param": { - "mailHost": "mail1", - "mailHostOverride": "mail2"}}, - { - "servlet-name": "cofaxAdmin", - "servlet-class": "org.cofax.cds.AdminServlet"}, - - { - "servlet-name": "fileServlet", - "servlet-class": "org.cofax.cds.FileServlet"}, - { - "servlet-name": "cofaxTools", - "servlet-class": "org.cofax.cms.CofaxToolsServlet", - "init-param": { - "templatePath": "toolstemplates/", - "log": 1, - "logLocation": "/usr/local/tomcat/logs/CofaxTools.log", - "logMaxSize": "", - "dataLog": 1, - "dataLogLocation": "/usr/local/tomcat/logs/dataLog.log", - "dataLogMaxSize": "", - "removePageCache": "/content/admin/remove?cache=pages&id=", - "removeTemplateCache": "/content/admin/remove?cache=templates&id=", - "fileTransferFolder": "/usr/local/tomcat/webapps/content/fileTransferFolder", - "lookInContext": 1, - "adminGroupID": 4, - "betaServer": true}}], - "servlet-mapping": { - "cofaxCDS": "/", - "cofaxEmail": "/cofaxutil/aemail/*", - "cofaxAdmin": "/admin/*", - "fileServlet": "/static/*", - "cofaxTools": "/tools/*"}, - - "taglib": { - "taglib-uri": "cofax.tld", - "taglib-location": "/WEB-INF/tlds/cofax.tld"} - } -}""" - //println(sample3) - printJSON(sample3) - println -} diff --git a/test/files/run/json.scala.disabled b/test/files/run/json.scala.disabled new file mode 100644 index 0000000000..2e7ee4aa4d --- /dev/null +++ b/test/files/run/json.scala.disabled @@ -0,0 +1,158 @@ +import scala.util.parsing.json._ + +object Test extends Application { + def printJSON(s: String) { + println(JSON parse s) + } + printJSON("{\"name\": \"value\"}") + printJSON("{\"name\": \"va1ue\"}") // ticket #136 + printJSON("{\"name\": { \"name1\": \"va1ue1\", \"name2\": \"va1ue2\" } }") + printJSON("{\"name\": \"\\u0022\"}") + printJSON("{\"age\": 0}") + println + + // from http://en.wikipedia.org/wiki/JSON + val sample1 = """ +{ + "firstName": "John", + "lastName": "Smith", + "address": { + "streetAddress": "21 2nd Street", + "city": "New York", + "state": "NY", + "postalCode": 10021 + }, + "phoneNumbers": [ + "212 732-1234", + "646 123-4567" + ] +}""" + //println(sample1) + printJSON(sample1) + println + + // from http://www.developer.com/lang/jscript/article.php/3596836 + val sample2 = """ +{ + "fullname": "Sean Kelly", + "org": "SK Consulting", + "emailaddrs": [ + {"type": "work", "value": "kelly@seankelly.biz"}, + {"type": "home", "pref": 1, "value": "kelly@seankelly.tv"} + ], + "telephones": [ + {"type": "work", "pref": 1, "value": "+1 214 555 1212"}, + {"type": "fax", "value": "+1 214 555 1213"}, + {"type": "mobile", "value": "+1 214 555 1214"} + ], + "addresses": [ + {"type": "work", "format": "us", + "value": "1234 Main StnSpringfield, TX 78080-1216"}, + {"type": "home", "format": "us", + "value": "5678 Main StnSpringfield, TX 78080-1316"} + ], + "urls": [ + {"type": "work", "value": "http://seankelly.biz/"}, + {"type": "home", "value": "http://seankelly.tv/"} + ] +}""" + //println(sample2) + printJSON(sample2) + println + + // from http://json.org/example.html + val sample3 = """ +{"web-app": { + "servlet": [ + { + "servlet-name": "cofaxCDS", + "servlet-class": "org.cofax.cds.CDSServlet", + "init-param": { + "configGlossary:installationAt": "Philadelphia, PA", + "configGlossary:adminEmail": "ksm@pobox.com", + "configGlossary:poweredBy": "Cofax", + "configGlossary:poweredByIcon": "/images/cofax.gif", + "configGlossary:staticPath": "/content/static", + "templateProcessorClass": "org.cofax.WysiwygTemplate", + "templateLoaderClass": "org.cofax.FilesTemplateLoader", + "templatePath": "templates", + "templateOverridePath": "", + "defaultListTemplate": "listTemplate.htm", + "defaultFileTemplate": "articleTemplate.htm", + "useJSP": false, + "jspListTemplate": "listTemplate.jsp", + "jspFileTemplate": "articleTemplate.jsp", + "cachePackageTagsTrack": 200, + "cachePackageTagsStore": 200, + "cachePackageTagsRefresh": 60, + "cacheTemplatesTrack": 100, + "cacheTemplatesStore": 50, + "cacheTemplatesRefresh": 15, + "cachePagesTrack": 200, + "cachePagesStore": 100, + "cachePagesRefresh": 10, + "cachePagesDirtyRead": 10, + "searchEngineListTemplate": "forSearchEnginesList.htm", + "searchEngineFileTemplate": "forSearchEngines.htm", + "searchEngineRobotsDb": "WEB-INF/robots.db", + "useDataStore": true, + "dataStoreClass": "org.cofax.SqlDataStore", + "redirectionClass": "org.cofax.SqlRedirection", + "dataStoreName": "cofax", + "dataStoreDriver": "com.microsoft.jdbc.sqlserver.SQLServerDriver", + "dataStoreUrl": "jdbc:microsoft:sqlserver://LOCALHOST:1433;DatabaseName=goon", + "dataStoreUser": "sa", + "dataStorePassword": "dataStoreTestQuery", + "dataStoreTestQuery": "SET NOCOUNT ON;select test='test';", + "dataStoreLogFile": "/usr/local/tomcat/logs/datastore.log", + "dataStoreInitConns": 10, + "dataStoreMaxConns": 100, + "dataStoreConnUsageLimit": 100, + "dataStoreLogLevel": "debug", + "maxUrlLength": 500}}, + { + "servlet-name": "cofaxEmail", + "servlet-class": "org.cofax.cds.EmailServlet", + "init-param": { + "mailHost": "mail1", + "mailHostOverride": "mail2"}}, + { + "servlet-name": "cofaxAdmin", + "servlet-class": "org.cofax.cds.AdminServlet"}, + + { + "servlet-name": "fileServlet", + "servlet-class": "org.cofax.cds.FileServlet"}, + { + "servlet-name": "cofaxTools", + "servlet-class": "org.cofax.cms.CofaxToolsServlet", + "init-param": { + "templatePath": "toolstemplates/", + "log": 1, + "logLocation": "/usr/local/tomcat/logs/CofaxTools.log", + "logMaxSize": "", + "dataLog": 1, + "dataLogLocation": "/usr/local/tomcat/logs/dataLog.log", + "dataLogMaxSize": "", + "removePageCache": "/content/admin/remove?cache=pages&id=", + "removeTemplateCache": "/content/admin/remove?cache=templates&id=", + "fileTransferFolder": "/usr/local/tomcat/webapps/content/fileTransferFolder", + "lookInContext": 1, + "adminGroupID": 4, + "betaServer": true}}], + "servlet-mapping": { + "cofaxCDS": "/", + "cofaxEmail": "/cofaxutil/aemail/*", + "cofaxAdmin": "/admin/*", + "fileServlet": "/static/*", + "cofaxTools": "/tools/*"}, + + "taglib": { + "taglib-uri": "cofax.tld", + "taglib-location": "/WEB-INF/tlds/cofax.tld"} + } +}""" + //println(sample3) + printJSON(sample3) + println +} -- cgit v1.2.3