-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
60 changed files
with
268 additions
and
136 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,30 @@ | ||
# cached expressions are displayed propperly | ||
|
||
Code | ||
cache_info[, c("n", "size", "last_modified", "activated")] | ||
Output | ||
# A tibble: 1 x 4 | ||
n size last_modified activated | ||
<int> <dbl> <dttm> <lgl> | ||
1 0 0 -Inf -Inf FALSE | ||
|
||
--- | ||
|
||
Code | ||
cache_info[, c("n", "size", "activated")] | ||
Output | ||
# A tibble: 1 x 3 | ||
n size activated | ||
<int> <dbl> <lgl> | ||
1 1 0 TRUE | ||
|
||
--- | ||
|
||
Code | ||
cache_info[, c("n", "size", "activated")] | ||
Output | ||
# A tibble: 1 x 3 | ||
n size activated | ||
<int> <dbl> <lgl> | ||
1 2 0 TRUE | ||
|
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,28 @@ | ||
# escaping of characters works | ||
|
||
<text>:2:7: unexpected '{' | ||
1: | ||
2: fun() { | ||
^ | ||
|
||
--- | ||
|
||
<text>:3:0: unexpected end of input | ||
1: | ||
2: x <- | ||
^ | ||
|
||
--- | ||
|
||
<text>:2:3: unexpected input | ||
1: | ||
2: 1 _ | ||
^ | ||
|
||
--- | ||
|
||
<text>:6:0: unexpected end of input | ||
4: | ||
5: | ||
^ | ||
|
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,15 @@ | ||
# can construct and print vertical | ||
|
||
Code | ||
construct_vertical(c("1 + 1", "nw")) | ||
Output | ||
1 + 1 | ||
nw | ||
|
||
# can lookup tokens | ||
|
||
Code | ||
lookup_new_special() | ||
Output | ||
[1] "SPECIAL-PIPE" "SPECIAL-IN" "SPECIAL-OTHER" | ||
|
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,54 @@ | ||
# messages (via cat()) of style_file are correct | ||
|
||
Code | ||
cat(catch_style_file_output(file.path("public-api", "xyzdir-dirty", | ||
"dirty-sample-with-scope-tokens.R")), sep = "\n") | ||
Output | ||
Styling 1 files: | ||
dirty-sample-with-scope-tokens.R i | ||
---------------------------------------- | ||
Status Count Legend | ||
v 0 File unchanged. | ||
i 1 File changed. | ||
x 0 Styling threw an error. | ||
---------------------------------------- | ||
Please review the changes carefully! | ||
|
||
--- | ||
|
||
Code | ||
cat(catch_style_file_output(file.path("public-api", "xyzdir-dirty", | ||
"clean-sample-with-scope-tokens.R")), sep = "\n") | ||
Output | ||
Styling 1 files: | ||
clean-sample-with-scope-tokens.R v | ||
---------------------------------------- | ||
Status Count Legend | ||
v 1 File unchanged. | ||
i 0 File changed. | ||
x 0 Styling threw an error. | ||
---------------------------------------- | ||
|
||
--- | ||
|
||
Code | ||
cat(catch_style_file_output(file.path("public-api", "xyzdir-dirty", | ||
"dirty-sample-with-scope-spaces.R")), sep = "\n") | ||
Output | ||
Styling 1 files: | ||
dirty-sample-with-scope-spaces.R i | ||
---------------------------------------- | ||
Status Count Legend | ||
v 0 File unchanged. | ||
i 1 File changed. | ||
x 0 Styling threw an error. | ||
---------------------------------------- | ||
Please review the changes carefully! | ||
|
||
# No sensitive to decimal option | ||
|
||
Code | ||
style_text("1") | ||
Output | ||
1 | ||
|
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,9 @@ | ||
# correct styling does not give an error | ||
|
||
Code | ||
verify_roundtrip("1+1", "1 + 1") | ||
|
||
# corrupt styling does give an error | ||
|
||
The expression evaluated before the styling is not the same as the expression after styling. This should not happen. Please file a bug report on GitHub (https://github.com/r-lib/styler/issues) using a reprex. | ||
|
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,24 @@ | ||
# files with and without blank EOF line are read correctly | ||
|
||
Code | ||
read_utf8(test_path("reference-objects/missing-blank-at-EOF.R")) | ||
Output | ||
$text | ||
[1] "x" | ||
$missing_EOF_line_break | ||
[1] TRUE | ||
|
||
--- | ||
|
||
Code | ||
read_utf8(test_path("reference-objects/non-missing-blank-at-EOF.R")) | ||
Output | ||
$text | ||
[1] "x" | ||
$missing_EOF_line_break | ||
[1] FALSE | ||
|
2 changes: 1 addition & 1 deletion
2
tests/testthat/public-api/renvpkg/tests/testthat/test-package-xyz.R
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
context("testing styler on package") | ||
|
||
|
||
test_that("hi there", { | ||
I(am(a(package(x)))) | ||
|
Binary file removed
BIN
-182 Bytes
tests/testthat/public-api/xyzdir-dirty/clean-reference-with-scope-tokens-non-utf8
Binary file not shown.
Binary file removed
BIN
-197 Bytes
tests/testthat/public-api/xyzdir-dirty/clean-reference-with-scope-tokens-utf8
Binary file not shown.
Binary file removed
BIN
-204 Bytes
tests/testthat/public-api/xyzdir-dirty/dirty-reference-with-scope-spaces-non-utf8
Binary file not shown.
Binary file removed
BIN
-225 Bytes
tests/testthat/public-api/xyzdir-dirty/dirty-reference-with-scope-spaces-utf8
Binary file not shown.
Binary file removed
BIN
-204 Bytes
tests/testthat/public-api/xyzdir-dirty/dirty-reference-with-scope-tokens-non-utf8
Binary file not shown.
Binary file removed
BIN
-225 Bytes
tests/testthat/public-api/xyzdir-dirty/dirty-reference-with-scope-tokens-utf8
Binary file not shown.
2 changes: 1 addition & 1 deletion
2
tests/testthat/public-api/xyzpackage-qmd/tests/testthat/test-package-xyz.R
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
context("testing styler on package") | ||
|
||
|
||
test_that("hi there", { | ||
I(am(a(package(x)))) | ||
|
2 changes: 1 addition & 1 deletion
2
tests/testthat/public-api/xyzpackage-rmd/tests/testthat/test-package-xyz.R
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
context("testing styler on package") | ||
|
||
|
||
test_that("hi there", { | ||
I(am(a(package(x)))) | ||
|
2 changes: 1 addition & 1 deletion
2
tests/testthat/public-api/xyzpackage-rnw/tests/testthat/test-package-xyz.R
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
context("testing styler on package") | ||
|
||
|
||
test_that("hi there", { | ||
I(am(a(package(x)))) | ||
|
2 changes: 1 addition & 1 deletion
2
tests/testthat/public-api/xyzpackage/tests/testthat/test-package-xyz.R
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
context("testing styler on package") | ||
|
||
|
||
test_that("hi there", { | ||
I(am(a(package(x)))) | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
context("token insertion") | ||
|
||
|
||
test_that("can create a token that has relevant columns", { | ||
pd_names <- c( | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
context("curly-curly") | ||
|
||
|
||
test_that("curly-culry", { | ||
expect_warning(test_collection("curly-curly", | ||
|
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
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
context("test-roxygen-examples-identify.R") | ||
|
||
|
||
#' Things to consider: | ||
#' * one function declaration or many | ||
|
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
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
Oops, something went wrong.