r - R ShinyTest GitHub Actions 在 Windows 上失败,但在 Mac 和 Ubuntu 上通过
问题描述
我的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 上不传递?
解决方案
这可能是因为 Windows 如何处理换行符,换行符的编码方式与Linux 和\r\n
MacOS\n
不同。如果您正在使用 阅读文本输出readBin
,请readLines
改用。
推荐阅读
- excel - excel中是否有一个功能可以帮助我增加和减少货币价值的分数到特定的小变化?
- oracle - SQL Server Polybase 使用列数据类型 TIMESTAMP WITH TIME ZONE 向 Oracle 创建外部表错误
- pandas - python中的子图,带有使用pandas ans seaborn的多个折线图
- open-policy-agent - OPA PrepareForEval 时间呈指数增长
- python - 如何通过控制台输入杀死线程
- node.js - 无法获取授权代码:错误:证书链中的自签名证书 - NodeJS 适配器 Keycloak
- java - JSOUP:提取文本之间
我要提取的文本
- mysql - wp-options 表大尺寸非常快
- c# - 使用 .net api 通过 Google 登录
- python - FileNotFoundError:[Errno 2] 没有这样的文件或目录:找不到文件的路径