Skip to content

Commit

Permalink
Add task to test current file (#1415)
Browse files Browse the repository at this point in the history
  • Loading branch information
gowerc authored Oct 7, 2023
1 parent 42fd198 commit f5207d7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2086,7 +2086,7 @@
],
"pattern": [
{
"regexp": "^(Failure|Error)\\s\\((.*\\.[Rr]):(\\d+):?(\\d+)?\\):\\s(.*)",
"regexp": "^[-─ ]*(Failure|Error)\\s\\((.*\\.[Rr]):(\\d+):?(\\d+)?\\):\\s(.*)",
"file": 2,
"line": 3,
"column": 4,
Expand Down
10 changes: 10 additions & 0 deletions src/tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@ const rtasks: RTaskInfo[] = [
problemMatchers: '$testthat'
},

{
definition: {
type: TYPE,
code: ['testthat::test_file("${file}")']
},
name: 'Test (Current File)',
group: vscode.TaskGroup.Test,
problemMatchers: '$testthat'
},

{
definition: {
type: TYPE,
Expand Down

0 comments on commit f5207d7

Please sign in to comment.