starcoin
starcoin copied to clipboard
[MPM] Executing the integration test on the Windows platform will cause the verification failure due to the newline of the exp file being replaced by CRLF
Bug Report
Executing the integration test on the Windows platform will cause the verification failure due to the newline of the exp file being replaced by CRLF
OS: Windows 10 mpm: v1.11.9-alpha
Current behavior:
Expected behavior:
Verified
Steps to reproduce:
git config --global core.autocrlf true
git clone https://github.com/starcoinorg/guide-to-move-package-manager.git
cd simple-nft
mv spectests integration-tests
mpm.exe integration-test
The test output comparison should ignore the CRLF
https://github.com/move-language/move/blob/8958b40e97a4f94a588e5365fdb90ec18f00d888/language/testing-infra/transactional-test-runner/src/framework.rs#L742
let expected_output = std::fs::read_to_string(&exp_path).unwrap();
if output != expected_output {
let msg = format!(
"Expected errors differ from actual errors:\n{}",
format_diff(expected_output, output),
);
anyhow::bail!(msg)
} else {
Ok(())
}