我的Shinytest测试在Windows上失败了,但在我的GitHub Actions CI上通过了Mac和Ubuntu的测试。它们在我的Windows和Mac PC上都能在本地正常通过。
这是我的错误:
-- FAILURE (test-app.R:9:3): all modules work ----------------------------------
Not all shinytest scripts passed for apps/selector_app: selector_test
Diff output:
==== selector_test ====
diff "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\RtmpWYO0Oy/working_dir\\RtmpqmGvu2\\shinytest-diff-690eb816c1/selector_test-expected/001.json" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\RtmpWYO0Oy/working_dir\\RtmpqmGvu2\\shinytest-diff-690eb816c1/selector_test-current/001.json"
1,12c1,12
< {
< "input": {
< "selector-procedure": "",
< "selector-subject: ""
< },
< "output": {
< "text": "You have selected subjectID and procedure ."
< },
< "export": {
<
< }
< }
---
> {
> "input": {
> "selector-procedure": "",
> "selector-subject": ""
> },
> "output": {
> "text": "You have selected subjectID and procedure ."
> },
> "export": {
>
> }
> }我不明白根据差异有什么不同,或者为什么这可以在Mac和Ubuntu上通过,而不是在Windows上?
发布于 2020-11-16 06:38:09
这可能是因为Windows处理换行符的方式,换行符被编码为\r\n而不是Linux和MacOS上的\n。如果您正在使用readBin读取文本输出,请改用readLines。
https://stackoverflow.com/questions/64850430
复制相似问题