这是一个奇怪的问题,我不确定如何提供重现的方法。但基本上,当我在ARM64上构建data.xml时,测试运行时,其中两个测试失败了。当我使用X64架构做同样的事情时,没有出现此类错误。
测试clojure.data.xml.test-emit
FAIL in (test-indent-str) (test_emit.clj:123)
expected: (= expect (indent-str nested-xml))
actual: (not (= "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<a>\n <b>\n <c>\n <d>foo</d>\n </c>\n </b>\n</a>\n" "<?xml version=\"1.0\" encoding=\"UTF-8\"?><a>\n <b>\n <c>\n <d>foo</d>\n </c>\n </b>\n</a>\n"))
FAIL in (test-indent) (test_emit.clj:131)
expected: (= expect (.toString sw))
actual: (not (= "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<a>\n <b>\n <c>\n <d>foo</d>\n </c>\n </b>\n</a>\n" "<?xml version=\"1.0\" encoding=\"UTF-8\"?><a>\n <b>\n <c>\n <d>foo</d>\n </c>\n </b>\n</a>\n"))
Ran 9 tests containing 12 assertions.
2 failures, 0 errors.
缩进方面的差异似乎在于ARM64上缺少了XML声明后面的换行符
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<a>\n <b>\n <c>\n <d>foo</d>\n </c>\n </b>\n</a>\n"
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><a>\n <b>\n <c>\n <d>foo</d>\n </c>\n </b>\n</a>\n"