diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-12-28 17:41:28 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-12-28 17:41:28 -0800 |
commit | 079cf1d067ec21e590f0ec025cbc282f8290e2fa (patch) | |
tree | 9cc6bd45acdbe94fc4e9532c0813c9c78d00f39e /tests | |
parent | 239dac3bdcc993690227839899bde3d861d756ed (diff) | |
download | txr-079cf1d067ec21e590f0ec025cbc282f8290e2fa.tar.gz txr-079cf1d067ec21e590f0ec025cbc282f8290e2fa.tar.bz2 txr-079cf1d067ec21e590f0ec025cbc282f8290e2fa.zip |
hash: read/print consistency regression.
TXR 188 makes a slight mess of the #H notation. An :eql-based
hash table prints as #H(() ...), but when that notation is
read, it produces an :equal-based hash table. No aspect of
this situation was intended; the intent was that the notation
stays the same as before, and just the hash function changes
to make :equal-based the default. Let's just go with this
and have #H(() ...) denote :equal-based tables.
* hash.c (hash_print_op): Print an :eql-based for eql-based
hash tables, and nothing for equal-based ones. In
compatibility mode with 188 and older, reproduce the old
behavior, rendering equal-based tables with :equal-based and
the absence of a symbol for eql-based.
* txr.1: Updated places that touch on :equal-based and
added compatibility notes.
* tests/009/json.expected: updated, since equal-based hash
tables now print without :equal-based keyword.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/009/json.expected | 92 |
1 files changed, 44 insertions, 48 deletions
diff --git a/tests/009/json.expected b/tests/009/json.expected index 4e80c58f..8bc4ab9a 100644 --- a/tests/009/json.expected +++ b/tests/009/json.expected @@ -1,54 +1,50 @@ -AST: #H((:equal-based) ("web-app" #H((:equal-based) ("servlet-mapping" #H((:equal-based) ("cofaxTools" "/tools/*") ("cofaxCDS" "/") ("cofaxAdmin" "/admin/*") - ("cofaxEmail" "/cofaxutil/aemail/*") ("fileServlet" "/static/*"))) - ("servlet" #(#H((:equal-based) ("servlet-class" "org.cofax.cds.CDSServlet") ("init-param" #H((:equal-based) ("defaultFileTemplate" "articleTemplate.htm") - ("configGlossary:installationAt" "Philadelphia, PA") ("templateOverridePath" "") - ("dataStoreLogLevel" "debug") ("searchEngineListTemplate" "forSearchEnginesList.htm") - ("dataStoreClass" "org.cofax.SqlDataStore") ("configGlossary:poweredBy" "Cofax") - ("jspFileTemplate" "articleTemplate.jsp") ("cacheTemplatesTrack" 100.0) - ("cacheTemplatesStore" 50.0) ("templateProcessorClass" "org.cofax.WysiwygTemplate") - ("dataStoreUser" "sa") ("redirectionClass" "org.cofax.SqlRedirection") - ("dataStoreConnUsageLimit" 100.0) ("dataStoreMaxConns" 100.0) - ("jspListTemplate" "listTemplate.jsp") ("useJSP" :false) ("configGlossary:poweredByIcon" "/images/cofax.gif") - ("templateLoaderClass" "org.cofax.FilesTemplateLoader") ("cacheTemplatesRefresh" 15.0) - ("cachePagesDirtyRead" 10.0) ("searchEngineRobotsDb" "WEB-INF/robots.db") - ("cachePagesStore" 100.0) ("dataStoreTestQuery" "SET NOCOUNT ON;select test='test';") - ("configGlossary:adminEmail" "ksm@pobox.com") ("configGlossary:staticPath" "/content/static") - ("dataStoreInitConns" 10.0) ("cachePagesTrack" 200.0) ("dataStorePassword" "dataStoreTestQuery") - ("defaultListTemplate" "listTemplate.htm") ("dataStoreLogFile" "/usr/local/tomcat/logs/datastore.log") - ("maxUrlLength" 500.0) ("dataStoreDriver" "com.microsoft.jdbc.sqlserver.SQLServerDriver") - ("dataStoreName" "cofax") ("cachePackageTagsRefresh" 60.0) ("templatePath" "templates") - ("dataStoreUrl" "jdbc:microsoft:sqlserver://LOCALHOST:1433;DatabaseName=goon") - ("useDataStore" :true) ("cachePackageTagsTrack" 200.0) ("searchEngineFileTemplate" "forSearchEngines.htm") - ("cachePackageTagsStore" 200.0) ("cachePagesRefresh" 10.0))) - ("servlet-name" "cofaxCDS")) #H((:equal-based) ("servlet-class" "org.cofax.cds.EmailServlet") - ("init-param" #H((:equal-based) ("mailHost" "mail1") ("mailHostOverride" "mail2"))) - ("servlet-name" "cofaxEmail")) - #H((:equal-based) ("servlet-class" "org.cofax.cds.AdminServlet") - ("servlet-name" "cofaxAdmin")) #H((:equal-based) ("servlet-class" "org.cofax.cds.FileServlet") - ("servlet-name" "fileServlet")) - #H((:equal-based) ("servlet-class" "org.cofax.cms.CofaxToolsServlet") - ("init-param" #H((:equal-based) ("lookInContext" 1.0) ("removePageCache" "/content/admin/remove?cache=pages&id=") - ("logMaxSize" "") ("dataLogMaxSize" "") ("removeTemplateCache" "/content/admin/remove?cache=templates&id=") - ("dataLog" 1.0) ("logLocation" "/usr/local/tomcat/logs/CofaxTools.log") - ("log" 1.0) ("adminGroupID" 4.0) ("templatePath" "toolstemplates/") - ("betaServer" :true) ("dataLogLocation" "/usr/local/tomcat/logs/dataLog.log") - ("fileTransferFolder" "/usr/local/tomcat/webapps/content/fileTransferFolder"))) - ("servlet-name" "cofaxTools")))) ("taglib" #H((:equal-based) ("taglib-uri" "cofax.tld") ("taglib-location" "/WEB-INF/tlds/cofax.tld")))))) +AST: #H(() ("web-app" #H(() ("servlet-mapping" #H(() ("cofaxTools" "/tools/*") ("cofaxCDS" "/") ("cofaxAdmin" "/admin/*") + ("cofaxEmail" "/cofaxutil/aemail/*") ("fileServlet" "/static/*"))) + ("servlet" #(#H(() ("servlet-class" "org.cofax.cds.CDSServlet") ("init-param" #H(() ("defaultFileTemplate" "articleTemplate.htm") ("configGlossary:installationAt" "Philadelphia, PA") + ("templateOverridePath" "") ("dataStoreLogLevel" "debug") ("searchEngineListTemplate" "forSearchEnginesList.htm") + ("dataStoreClass" "org.cofax.SqlDataStore") ("configGlossary:poweredBy" "Cofax") + ("jspFileTemplate" "articleTemplate.jsp") ("cacheTemplatesTrack" 100.0) + ("cacheTemplatesStore" 50.0) ("templateProcessorClass" "org.cofax.WysiwygTemplate") + ("dataStoreUser" "sa") ("redirectionClass" "org.cofax.SqlRedirection") + ("dataStoreConnUsageLimit" 100.0) ("dataStoreMaxConns" 100.0) + ("jspListTemplate" "listTemplate.jsp") ("useJSP" :false) ("configGlossary:poweredByIcon" "/images/cofax.gif") + ("templateLoaderClass" "org.cofax.FilesTemplateLoader") ("cacheTemplatesRefresh" 15.0) + ("cachePagesDirtyRead" 10.0) ("searchEngineRobotsDb" "WEB-INF/robots.db") + ("cachePagesStore" 100.0) ("dataStoreTestQuery" "SET NOCOUNT ON;select test='test';") + ("configGlossary:adminEmail" "ksm@pobox.com") ("configGlossary:staticPath" "/content/static") + ("dataStoreInitConns" 10.0) ("cachePagesTrack" 200.0) ("dataStorePassword" "dataStoreTestQuery") + ("defaultListTemplate" "listTemplate.htm") ("dataStoreLogFile" "/usr/local/tomcat/logs/datastore.log") + ("maxUrlLength" 500.0) ("dataStoreDriver" "com.microsoft.jdbc.sqlserver.SQLServerDriver") + ("dataStoreName" "cofax") ("cachePackageTagsRefresh" 60.0) ("templatePath" "templates") + ("dataStoreUrl" "jdbc:microsoft:sqlserver://LOCALHOST:1433;DatabaseName=goon") + ("useDataStore" :true) ("cachePackageTagsTrack" 200.0) ("searchEngineFileTemplate" "forSearchEngines.htm") + ("cachePackageTagsStore" 200.0) ("cachePagesRefresh" 10.0))) + ("servlet-name" "cofaxCDS")) #H(() ("servlet-class" "org.cofax.cds.EmailServlet") ("init-param" #H(() ("mailHost" "mail1") ("mailHostOverride" "mail2"))) + ("servlet-name" "cofaxEmail")) + #H(() ("servlet-class" "org.cofax.cds.AdminServlet") ("servlet-name" "cofaxAdmin")) + #H(() ("servlet-class" "org.cofax.cds.FileServlet") ("servlet-name" "fileServlet")) + #H(() ("servlet-class" "org.cofax.cms.CofaxToolsServlet") ("init-param" #H(() ("lookInContext" 1.0) ("removePageCache" "/content/admin/remove?cache=pages&id=") + ("logMaxSize" "") ("dataLogMaxSize" "") ("removeTemplateCache" "/content/admin/remove?cache=templates&id=") + ("dataLog" 1.0) ("logLocation" "/usr/local/tomcat/logs/CofaxTools.log") + ("log" 1.0) ("adminGroupID" 4.0) ("templatePath" "toolstemplates/") + ("betaServer" :true) ("dataLogLocation" "/usr/local/tomcat/logs/dataLog.log") + ("fileTransferFolder" "/usr/local/tomcat/webapps/content/fileTransferFolder"))) + ("servlet-name" "cofaxTools")))) ("taglib" #H(() ("taglib-uri" "cofax.tld") ("taglib-location" "/WEB-INF/tlds/cofax.tld")))))) Unmatched junk: "" -AST: #("JSON Test Pattern pass1" #H((:equal-based) ("object with 1 member" #("array with 1 element"))) - #H((:equal-based)) #() -42.0 :true :false :null #H((:equal-based) ("" 2.3456789012e76) ("digit" "0123456789") ("\\/\\\\\"쫾몾ꮘﳞ볚\b\f\n\r\t`1~!@#$%^&*()_+-=[]{}|;:',./<>?" "A key can be any string") - ("null" :null) ("one" 1.0) ("E" 1.23456789e34) ("special" "`1~!@#$%^&*()_+-={':[,]}|;.</>?") - ("e" 1.23456789e-13) ("comment" "// /* <!-- --") ("# -- --> */" " ") - ("real" -9876.54321) ("backslash" "\\\\") ("array" #()) ("url" "http://www.JSON.org/") - ("zero" 0.0) ("false" :false) ("space" " ") ("slash" "/ & \\/") - ("address" "50 St. James Street") ("compact" #(1.0 2.0 3.0 4.0 5.0 6.0 7.0)) - ("object" #H((:equal-based))) ("quote" "\"") ("jsontext" "{\"object with 1 member\":[\"array with 1 element\"]}") - ("true" :true) ("integer" 1234567890.0) ("ALPHA" "ABCDEFGHIJKLMNOPQRSTUVWYZ") - ("quotes" "" \" %22 0x22 034 "") ("hex" "ģ䕧覫췯ꯍ") - ("0123456789" "digit") ("controls" "\b\f\n\r\t") ("alpha" "abcdefghijklmnopqrstuvwyz") - (" s p a c e d " #(1.0 2.0 3.0 4.0 5.0 6.0 7.0))) +AST: #("JSON Test Pattern pass1" #H(() ("object with 1 member" #("array with 1 element"))) + #H(()) #() -42.0 :true :false :null #H(() ("" 2.3456789012e76) ("digit" "0123456789") ("\\/\\\\\"쫾몾ꮘﳞ볚\b\f\n\r\t`1~!@#$%^&*()_+-=[]{}|;:',./<>?" "A key can be any string") + ("null" :null) ("one" 1.0) ("E" 1.23456789e34) ("special" "`1~!@#$%^&*()_+-={':[,]}|;.</>?") + ("e" 1.23456789e-13) ("comment" "// /* <!-- --") ("# -- --> */" " ") + ("real" -9876.54321) ("backslash" "\\\\") ("array" #()) ("url" "http://www.JSON.org/") + ("zero" 0.0) ("false" :false) ("space" " ") ("slash" "/ & \\/") + ("address" "50 St. James Street") ("compact" #(1.0 2.0 3.0 4.0 5.0 6.0 7.0)) + ("object" #H(())) ("quote" "\"") ("jsontext" "{\"object with 1 member\":[\"array with 1 element\"]}") + ("true" :true) ("integer" 1234567890.0) ("ALPHA" "ABCDEFGHIJKLMNOPQRSTUVWYZ") + ("quotes" "" \" %22 0x22 034 "") ("hex" "ģ䕧覫췯ꯍ") + ("0123456789" "digit") ("controls" "\b\f\n\r\t") ("alpha" "abcdefghijklmnopqrstuvwyz") + (" s p a c e d " #(1.0 2.0 3.0 4.0 5.0 6.0 7.0))) 0.5 98.6 99.44 1066.0 10.0 1.0 0.1 1.0 2.0 2.0 "rosebud") Unmatched junk: "" |