diff --git a/tests/testthat/roxygen-examples-complete/13-empty-lines-in.R b/tests/testthat/roxygen-examples-complete/13-empty-lines-in.R index e1ab00834..1af04bba3 100644 --- a/tests/testthat/roxygen-examples-complete/13-empty-lines-in.R +++ b/tests/testthat/roxygen-examples-complete/13-empty-lines-in.R @@ -12,17 +12,27 @@ #' #' #' +#' ( +#' +#' #' # more #' a <- 3 +#' +#' ) #' # a comment #' \dontrun{ +#' { +#' #' x #' +#' } +#' #' y # hi #' #' # more #' #' a <- 3 +#' #' } #' @importFrom purrr compact #' @export diff --git a/tests/testthat/roxygen-examples-complete/13-empty-lines-in_tree b/tests/testthat/roxygen-examples-complete/13-empty-lines-in_tree index b511569eb..f16a8469d 100644 --- a/tests/testthat/roxygen-examples-complete/13-empty-lines-in_tree +++ b/tests/testthat/roxygen-examples-complete/13-empty-lines-in_tree @@ -12,109 +12,119 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: #' [1/0] {11} ¦--COMMENT: #' [1/0] {12} ¦--COMMENT: #' [1/0] {13} - ¦--COMMENT: #' # [1/0] {14} - ¦--COMMENT: #' a [1/0] {15} - ¦--COMMENT: #' # [1/0] {16} - ¦--COMMENT: #' \d [1/0] {17} - ¦--COMMENT: #' x [1/0] {18} + ¦--COMMENT: #' ( [1/0] {14} + ¦--COMMENT: #' [1/0] {15} + ¦--COMMENT: #' [1/0] {16} + ¦--COMMENT: #' # [1/0] {17} + ¦--COMMENT: #' a [1/0] {18} ¦--COMMENT: #' [1/0] {19} - ¦--COMMENT: #' y [1/0] {20} - ¦--COMMENT: #' [1/0] {21} - ¦--COMMENT: #' # [1/0] {22} - ¦--COMMENT: #' [1/0] {23} - ¦--COMMENT: #' a [1/0] {24} - ¦--COMMENT: #' } [1/0] {25} - ¦--COMMENT: #' @i [1/0] {26} - ¦--COMMENT: #' @e [1/0] {27} - °--expr: creat [1/0] {28} - ¦--expr: creat [0/1] {30} - ¦ °--SYMBOL: creat [0/0] {29} - ¦--LEFT_ASSIGN: <- [0/1] {31} - °--expr: funct [0/0] {32} - ¦--FUNCTION: funct [0/0] {33} - ¦--'(': ( [0/0] {34} - ¦--SYMBOL_FORMALS: initi [0/1] {35} - ¦--EQ_FORMALS: = [0/1] {36} - ¦--expr: defau [0/0] {38} - ¦ °--SYMBOL: defau [0/0] {37} - ¦--',': , [0/31] {39} - ¦--SYMBOL_FORMALS: line_ [1/1] {40} - ¦--EQ_FORMALS: = [0/1] {41} - ¦--expr: NULL [0/0] {43} - ¦ °--NULL_CONST: NULL [0/0] {42} - ¦--',': , [0/31] {44} - ¦--SYMBOL_FORMALS: space [1/1] {45} + ¦--COMMENT: #' ) [1/0] {20} + ¦--COMMENT: #' # [1/0] {21} + ¦--COMMENT: #' \d [1/0] {22} + ¦--COMMENT: #' { [1/0] {23} + ¦--COMMENT: #' [1/0] {24} + ¦--COMMENT: #' x [1/0] {25} + ¦--COMMENT: #' [1/0] {26} + ¦--COMMENT: #' } [1/0] {27} + ¦--COMMENT: #' [1/0] {28} + ¦--COMMENT: #' y [1/0] {29} + ¦--COMMENT: #' [1/0] {30} + ¦--COMMENT: #' # [1/0] {31} + ¦--COMMENT: #' [1/0] {32} + ¦--COMMENT: #' a [1/0] {33} + ¦--COMMENT: #' [1/0] {34} + ¦--COMMENT: #' } [1/0] {35} + ¦--COMMENT: #' @i [1/0] {36} + ¦--COMMENT: #' @e [1/0] {37} + °--expr: creat [1/0] {38} + ¦--expr: creat [0/1] {40} + ¦ °--SYMBOL: creat [0/0] {39} + ¦--LEFT_ASSIGN: <- [0/1] {41} + °--expr: funct [0/0] {42} + ¦--FUNCTION: funct [0/0] {43} + ¦--'(': ( [0/0] {44} + ¦--SYMBOL_FORMALS: initi [0/1] {45} ¦--EQ_FORMALS: = [0/1] {46} - ¦--expr: NULL [0/0] {48} - ¦ °--NULL_CONST: NULL [0/0] {47} + ¦--expr: defau [0/0] {48} + ¦ °--SYMBOL: defau [0/0] {47} ¦--',': , [0/31] {49} - ¦--SYMBOL_FORMALS: token [1/1] {50} + ¦--SYMBOL_FORMALS: line_ [1/1] {50} ¦--EQ_FORMALS: = [0/1] {51} ¦--expr: NULL [0/0] {53} ¦ °--NULL_CONST: NULL [0/0] {52} ¦--',': , [0/31] {54} - ¦--SYMBOL_FORMALS: inden [1/1] {55} + ¦--SYMBOL_FORMALS: space [1/1] {55} ¦--EQ_FORMALS: = [0/1] {56} ¦--expr: NULL [0/0] {58} ¦ °--NULL_CONST: NULL [0/0] {57} ¦--',': , [0/31] {59} - ¦--SYMBOL_FORMALS: use_r [1/1] {60} + ¦--SYMBOL_FORMALS: token [1/1] {60} ¦--EQ_FORMALS: = [0/1] {61} - ¦--expr: FALSE [0/0] {63} - ¦ °--NUM_CONST: FALSE [0/0] {62} + ¦--expr: NULL [0/0] {63} + ¦ °--NULL_CONST: NULL [0/0] {62} ¦--',': , [0/31] {64} - ¦--SYMBOL_FORMALS: reind [1/1] {65} + ¦--SYMBOL_FORMALS: inden [1/1] {65} ¦--EQ_FORMALS: = [0/1] {66} - ¦--expr: tidyv [0/0] {67} - ¦ ¦--expr: tidyv [0/0] {69} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: tidyv [0/0] {68} - ¦ ¦--'(': ( [0/0] {70} - ¦ °--')': ) [0/0] {71} - ¦--')': ) [0/1] {72} + ¦--expr: NULL [0/0] {68} + ¦ °--NULL_CONST: NULL [0/0] {67} + ¦--',': , [0/31] {69} + ¦--SYMBOL_FORMALS: use_r [1/1] {70} + ¦--EQ_FORMALS: = [0/1] {71} + ¦--expr: FALSE [0/0] {73} + ¦ °--NUM_CONST: FALSE [0/0] {72} + ¦--',': , [0/31] {74} + ¦--SYMBOL_FORMALS: reind [1/1] {75} + ¦--EQ_FORMALS: = [0/1] {76} + ¦--expr: tidyv [0/0] {77} + ¦ ¦--expr: tidyv [0/0] {79} + ¦ ¦ °--SYMBOL_FUNCTION_CALL: tidyv [0/0] {78} + ¦ ¦--'(': ( [0/0] {80} + ¦ °--')': ) [0/0] {81} + ¦--')': ) [0/1] {82} °--expr: { - l [0/0] {73} - ¦--'{': { [0/2] {74} - ¦--expr: list( [1/0] {75} - ¦ ¦--expr: list( [0/1] {76} - ¦ ¦ ¦--expr: list [0/0] {78} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: list [0/0] {77} - ¦ ¦ ¦--'(': ( [0/4] {79} - ¦ ¦ ¦--COMMENT: # tra [1/4] {80} - ¦ ¦ ¦--SYMBOL_SUB: initi [1/1] {81} - ¦ ¦ ¦--EQ_SUB: = [0/1] {82} - ¦ ¦ ¦--expr: list( [0/0] {83} - ¦ ¦ ¦ ¦--expr: list [0/0] {85} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: list [0/0] {84} - ¦ ¦ ¦ ¦--'(': ( [0/0] {86} - ¦ ¦ ¦ ¦--expr: initi [0/0] {88} - ¦ ¦ ¦ ¦ °--SYMBOL: initi [0/0] {87} - ¦ ¦ ¦ °--')': ) [0/0] {89} - ¦ ¦ ¦--',': , [0/4] {90} - ¦ ¦ ¦--expr: line_ [1/0] {92} - ¦ ¦ ¦ °--SYMBOL: line_ [0/0] {91} - ¦ ¦ ¦--',': , [0/4] {93} - ¦ ¦ ¦--expr: space [1/0] {95} - ¦ ¦ ¦ °--SYMBOL: space [0/0] {94} - ¦ ¦ ¦--',': , [0/4] {96} - ¦ ¦ ¦--expr: token [1/0] {98} - ¦ ¦ ¦ °--SYMBOL: token [0/0] {97} - ¦ ¦ ¦--',': , [0/4] {99} - ¦ ¦ ¦--expr: inden [1/0] {101} - ¦ ¦ ¦ °--SYMBOL: inden [0/0] {100} - ¦ ¦ ¦--',': , [0/4] {102} - ¦ ¦ ¦--COMMENT: # tra [1/4] {103} - ¦ ¦ ¦--expr: use_r [1/0] {105} - ¦ ¦ ¦ °--SYMBOL: use_r [0/0] {104} + l [0/0] {83} + ¦--'{': { [0/2] {84} + ¦--expr: list( [1/0] {85} + ¦ ¦--expr: list( [0/1] {86} + ¦ ¦ ¦--expr: list [0/0] {88} + ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: list [0/0] {87} + ¦ ¦ ¦--'(': ( [0/4] {89} + ¦ ¦ ¦--COMMENT: # tra [1/4] {90} + ¦ ¦ ¦--SYMBOL_SUB: initi [1/1] {91} + ¦ ¦ ¦--EQ_SUB: = [0/1] {92} + ¦ ¦ ¦--expr: list( [0/0] {93} + ¦ ¦ ¦ ¦--expr: list [0/0] {95} + ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: list [0/0] {94} + ¦ ¦ ¦ ¦--'(': ( [0/0] {96} + ¦ ¦ ¦ ¦--expr: initi [0/0] {98} + ¦ ¦ ¦ ¦ °--SYMBOL: initi [0/0] {97} + ¦ ¦ ¦ °--')': ) [0/0] {99} + ¦ ¦ ¦--',': , [0/4] {100} + ¦ ¦ ¦--expr: line_ [1/0] {102} + ¦ ¦ ¦ °--SYMBOL: line_ [0/0] {101} + ¦ ¦ ¦--',': , [0/4] {103} + ¦ ¦ ¦--expr: space [1/0] {105} + ¦ ¦ ¦ °--SYMBOL: space [0/0] {104} ¦ ¦ ¦--',': , [0/4] {106} - ¦ ¦ ¦--expr: reind [1/2] {108} - ¦ ¦ ¦ °--SYMBOL: reind [0/0] {107} - ¦ ¦ °--')': ) [1/0] {109} - ¦ ¦--SPECIAL-PIPE: %>% [0/4] {110} - ¦ °--expr: map(c [1/0] {111} - ¦ ¦--expr: map [0/0] {113} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: map [0/0] {112} - ¦ ¦--'(': ( [0/0] {114} - ¦ ¦--expr: compa [0/0] {116} - ¦ ¦ °--SYMBOL: compa [0/0] {115} - ¦ °--')': ) [0/0] {117} - °--'}': } [1/0] {118} + ¦ ¦ ¦--expr: token [1/0] {108} + ¦ ¦ ¦ °--SYMBOL: token [0/0] {107} + ¦ ¦ ¦--',': , [0/4] {109} + ¦ ¦ ¦--expr: inden [1/0] {111} + ¦ ¦ ¦ °--SYMBOL: inden [0/0] {110} + ¦ ¦ ¦--',': , [0/4] {112} + ¦ ¦ ¦--COMMENT: # tra [1/4] {113} + ¦ ¦ ¦--expr: use_r [1/0] {115} + ¦ ¦ ¦ °--SYMBOL: use_r [0/0] {114} + ¦ ¦ ¦--',': , [0/4] {116} + ¦ ¦ ¦--expr: reind [1/2] {118} + ¦ ¦ ¦ °--SYMBOL: reind [0/0] {117} + ¦ ¦ °--')': ) [1/0] {119} + ¦ ¦--SPECIAL-PIPE: %>% [0/4] {120} + ¦ °--expr: map(c [1/0] {121} + ¦ ¦--expr: map [0/0] {123} + ¦ ¦ °--SYMBOL_FUNCTION_CALL: map [0/0] {122} + ¦ ¦--'(': ( [0/0] {124} + ¦ ¦--expr: compa [0/0] {126} + ¦ ¦ °--SYMBOL: compa [0/0] {125} + ¦ °--')': ) [0/0] {127} + °--'}': } [1/0] {128} diff --git a/tests/testthat/roxygen-examples-complete/13-empty-lines-out.R b/tests/testthat/roxygen-examples-complete/13-empty-lines-out.R index ae4f1b9db..a2f6f567b 100644 --- a/tests/testthat/roxygen-examples-complete/13-empty-lines-out.R +++ b/tests/testthat/roxygen-examples-complete/13-empty-lines-out.R @@ -11,11 +11,15 @@ #' #' #' -#' # more -#' a <- 3 +#' ( +#' # more +#' a <- 3 +#' ) #' # a comment #' \dontrun{ -#' x +#' { +#' x +#' } #' #' y # hi #'