这是一个奇怪的问题,我不确定如何提供可重复的例子。但基本来说,当我尝试在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"