-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix test snapshots with both old and new cli
R 3.6.x uses older cli now on GHA.
- Loading branch information
1 parent
e61bf67
commit 3f9af6d
Showing
4 changed files
with
186 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
# simple error with cli and colors | ||
|
||
Code | ||
cat(out$stderr) | ||
Output | ||
[1m[33mError[39m[22m in `f()`[90m at script.R:5:5[39m: | ||
[33m![39m This failed | ||
--- | ||
Backtrace: | ||
[90m1. [39mbase::[1msource[22m[38;5;178m([38;5;37m"script.R"[38;5;178m)[39m | ||
[90m2. | base::withVisible(eval(ei, envir))[39m | ||
[90m3. | base::eval(ei, envir)[39m | ||
[90m4. | base::eval(ei, envir)[39m | ||
[90m5. [39mglobal [1mf[22m[38;5;178m()[39m[90m at script.R:5:5[39m | ||
[90m6. [39mprocessx:::[1mthrow[22m[38;5;178m([38;5;37m"This failed"[38;5;178m)[39m[90m at script.R:4:10[39m | ||
Execution halted | ||
|
||
--- | ||
|
||
Code | ||
cat(out$stdout) | ||
Output | ||
[1m[33mError[39m[22m in `f()`[90m at script.R:6:5[39m: | ||
[33m![39m This failed | ||
[90mType .Last.error to see the more details.[39m | ||
|
||
# chain_error | ||
|
||
Code | ||
cat(out$stderr) | ||
Output | ||
[1m[33mError[39m[22m in `do()`[90m at script.R:19:14[39m: | ||
[33m![39m Failed to base64 encode | ||
[1mCaused by error[22m in `do2()`[90m at script.R:15:13[39m: | ||
[33m![39m something is wrong here | ||
[1mCaused by error[22m in `do3()`[90m at script.R:12:13[39m: | ||
[33m![39m because of this | ||
--- | ||
Backtrace: | ||
[90m 1. [39mbase::[1msource[22m[38;5;178m([38;5;37m"script.R"[38;5;178m)[39m | ||
[90m 2. | base::withVisible(eval(ei, envir))[39m | ||
[90m 3. | base::eval(ei, envir)[39m | ||
[90m 4. | base::eval(ei, envir)[39m | ||
[90m 5. [39mglobal [1mf[22m[38;5;178m()[39m[90m at script.R:20:9[39m | ||
[90m 6. [39mglobal [1mg[22m[38;5;178m()[39m[90m at script.R:17:14[39m | ||
[90m 7. [39mglobal [1mh[22m[38;5;178m()[39m[90m at script.R:18:14[39m | ||
[90m 8. [39mglobal [1mdo[22m[38;5;178m()[39m[90m at script.R:19:14[39m | ||
[90m 9. [39mprocessx:::[1mchain_error[22m[38;5;178m([39m[1mdo2[22m[33m()[39m, [38;5;37m"Failed to base64 encode"[38;5;178m)[39m[90m at script.R:15:13[39m | ||
[90m10. | base::withCallingHandlers({ ...[39m | ||
[90m11. [39mglobal [1mdo2[22m[38;5;178m()[39m | ||
[90m12. [39mprocessx:::[1mchain_error[22m[38;5;178m([39m[1mdo3[22m[33m()[39m, [38;5;37m"something is wrong here"[38;5;178m)[39m[90m at script.R:12:13[39m | ||
[90m13. | base::withCallingHandlers({ ...[39m | ||
[90m14. [39mglobal [1mdo3[22m[38;5;178m()[39m | ||
[90m15. [39mprocessx:::[1mthrow[22m[38;5;178m([38;5;37m"because of this"[38;5;178m)[39m[90m at script.R:9:13[39m | ||
[90m16. | base::signalCondition(cond)[39m | ||
[90m17. | (function (e) ...[39m | ||
[90m18. | processx:::throw_error(err, parent = e)[39m | ||
[90m19. | base::signalCondition(cond)[39m | ||
[90m20. | (function (e) ...[39m | ||
[90m21. | processx:::throw_error(err, parent = e)[39m | ||
Execution halted | ||
|
||
# full parent error is printed in non-interactive mode | ||
|
||
Code | ||
cat(out$stderr) | ||
Output | ||
[1m[33mError[39m[22m in `eval(ei, envir)`: | ||
[33m![39m failed to run external program | ||
[1mCaused by error[22m in `processx::run(px, c("return", "1"))`[90m at script.R:9:9[39m: | ||
[33m![39m System command 'px' failed | ||
--- | ||
Exit status: 1 | ||
Stderr: <empty> | ||
--- | ||
Backtrace: | ||
[90m 1. [39mbase::[1msource[22m[38;5;178m([38;5;37m"script.R"[38;5;178m)[39m | ||
[90m 2. | base::withVisible(eval(ei, envir))[39m | ||
[90m 3. | base::eval(ei, envir)[39m | ||
[90m 4. | base::eval(ei, envir)[39m | ||
[90m 5. [39mprocessx:::[1mchain_error[22m[38;5;178m([39mprocessx::[1mrun[22m[33m([39mpx, [1mc[22m[34m([39m[38;5;37m"return"[39m, [38;5;37m"1"[39m[34m)[39m[33m)[39m, [38;5;37m"failed to r[39m...[90m at script.R:9:9[39m | ||
[90m 6. | base::withCallingHandlers({ ...[39m | ||
[90m 7. [39mprocessx::[1mrun[22m[38;5;178m([39mpx, [1mc[22m[33m([39m[38;5;37m"return"[39m, [38;5;37m"1"[39m[33m)[39m[38;5;178m)[39m | ||
[90m 8. [39mprocessx:::throw(new_process_error(res, call = sys.call(), echo = echo, ... | ||
[90m 9. | base::signalCondition(cond)[39m | ||
[90m10. | (function (e) ...[39m | ||
[90m11. | processx:::throw_error(err, parent = e)[39m | ||
Execution halted | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
# simple error with cli and colors | ||
|
||
Code | ||
cat(out$stderr) | ||
Output | ||
[1m[33mError[39m[22m in `f()`[90m at script.R:5:5[39m: | ||
[33m![39m This failed | ||
--- | ||
Backtrace: | ||
[90m1. [39mbase::[36msource[39m[33m("script.R")[39m | ||
[90m2. | base::withVisible(eval(ei, envir))[39m | ||
[90m3. | base::eval(ei, envir)[39m | ||
[90m4. | base::eval(ei, envir)[39m | ||
[90m5. [39mglobal [36mf[39m[33m()[39m[90m at script.R:5:5[39m | ||
[90m6. [39mprocessx:::[36mthrow[39m[33m("This failed")[39m[90m at script.R:4:10[39m | ||
Execution halted | ||
|
||
--- | ||
|
||
Code | ||
cat(out$stdout) | ||
Output | ||
[1m[33mError[39m[22m in `f()`[90m at script.R:6:5[39m: | ||
[33m![39m This failed | ||
[90mType .Last.error to see the more details.[39m | ||
|
||
# chain_error | ||
|
||
Code | ||
cat(out$stderr) | ||
Output | ||
[1m[33mError[39m[22m in `do()`[90m at script.R:19:14[39m: | ||
[33m![39m Failed to base64 encode | ||
[1mCaused by error[22m in `do2()`[90m at script.R:15:13[39m: | ||
[33m![39m something is wrong here | ||
[1mCaused by error[22m in `do3()`[90m at script.R:12:13[39m: | ||
[33m![39m because of this | ||
--- | ||
Backtrace: | ||
[90m 1. [39mbase::[36msource[39m[33m("script.R")[39m | ||
[90m 2. | base::withVisible(eval(ei, envir))[39m | ||
[90m 3. | base::eval(ei, envir)[39m | ||
[90m 4. | base::eval(ei, envir)[39m | ||
[90m 5. [39mglobal [36mf[39m[33m()[39m[90m at script.R:20:9[39m | ||
[90m 6. [39mglobal [36mg[39m[33m()[39m[90m at script.R:17:14[39m | ||
[90m 7. [39mglobal [36mh[39m[33m()[39m[90m at script.R:18:14[39m | ||
[90m 8. [39mglobal [36mdo[39m[33m()[39m[90m at script.R:19:14[39m | ||
[90m 9. [39mprocessx:::[36mchain_error[39m[33m([39m[36mdo2[39m[34m()[39m, [33m"Failed to base64 encode")[39m[90m at script.R:15:13[39m | ||
[90m10. | base::withCallingHandlers({ ...[39m | ||
[90m11. [39mglobal [36mdo2[39m[33m()[39m | ||
[90m12. [39mprocessx:::[36mchain_error[39m[33m([39m[36mdo3[39m[34m()[39m, [33m"something is wrong here")[39m[90m at script.R:12:13[39m | ||
[90m13. | base::withCallingHandlers({ ...[39m | ||
[90m14. [39mglobal [36mdo3[39m[33m()[39m | ||
[90m15. [39mprocessx:::[36mthrow[39m[33m("because of this")[39m[90m at script.R:9:13[39m | ||
[90m16. | base::signalCondition(cond)[39m | ||
[90m17. | (function (e) ...[39m | ||
[90m18. | processx:::throw_error(err, parent = e)[39m | ||
[90m19. | base::signalCondition(cond)[39m | ||
[90m20. | (function (e) ...[39m | ||
[90m21. | processx:::throw_error(err, parent = e)[39m | ||
Execution halted | ||
|
||
# full parent error is printed in non-interactive mode | ||
|
||
Code | ||
cat(out$stderr) | ||
Output | ||
[1m[33mError[39m[22m in `eval(ei, envir)`: | ||
[33m![39m failed to run external program | ||
[1mCaused by error[22m in `processx::run(px, c("return", "1"))`[90m at script.R:9:9[39m: | ||
[33m![39m System command 'px' failed | ||
--- | ||
Exit status: 1 | ||
Stderr: <empty> | ||
--- | ||
Backtrace: | ||
[90m 1. [39mbase::[36msource[39m[33m("script.R")[39m | ||
[90m 2. | base::withVisible(eval(ei, envir))[39m | ||
[90m 3. | base::eval(ei, envir)[39m | ||
[90m 4. | base::eval(ei, envir)[39m | ||
[90m 5. [39mprocessx:::[36mchain_error[39m[33m([39mprocessx::[36mrun[39m[34m([39mpx, [36mc([39m[33m"return"[39m, [33m"1"[39m[36m)[39m[34m)[39m, [33m"failed to r[39m...[90m at script.R:9:9[39m | ||
[90m 6. | base::withCallingHandlers({ ...[39m | ||
[90m 7. [39mprocessx::[36mrun[39m[33m([39mpx, [36mc[39m[34m([39m[33m"return"[39m, [33m"1"[39m[34m)[39m[33m)[39m | ||
[90m 8. [39mprocessx:::throw(new_process_error(res, call = sys.call(), echo = echo, ... | ||
[90m 9. | base::signalCondition(cond)[39m | ||
[90m10. | (function (e) ...[39m | ||
[90m11. | processx:::throw_error(err, parent = e)[39m | ||
Execution halted | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters