Running 'documentation-tests.R' [0s]
  Running 'getParseFun-tests.R' [0s]
  Running 'getParseParent-tests.R' [0s]
  Running 'interface-tests.R' [0s]
  Running 'style-tests.R' [0s]
Running the tests in 'tests/style-tests.R' failed.
Complete output:
  > ### roger: Automated grading of R scripts
  > ###
  > ### Tests for the validity of the style linters.
  > ###
  > ### AUTHORS: Jean-Christophe Langlois, Vincent Goulet <vincent.goulet@act.ulaval.ca>
  > ### LICENSE: GPL 2 or later.
  > 
  > library(roger)
  > 
  > ## Tests are run by R CMD check in a non interactive session where
  > ## parse data is thrown out by default.
  > if (!interactive())
  +     options(keep.source = TRUE)
  > 
  > ###
  > ### Tests for code free of style errors
  > ###
  > 
  > ## General expressions
  > VALID_STYLE_FILE <- tempfile(fileext = ".R")
  > cat(
  + "## Correct use of left assign token",
  + "x <- 2",
  + "y <- 3",
  + "z <- c(42, 43)",
  + "",
  + "## Correct use of spacing",
  + ## Operators
  + "x + y",
  + "x - y",
  + "x > y",
  + "x >= y",
  + "x < y",
  + "x <= y",
  + "x == y",
  + "x != y",
  + "x & y",
  + "x | y",
  + "x && y",
  + "x || y",
  + "c(42, 43) -> z",
  + "x %% y",
  + "x %*% y",
  + "x * y",
  + "x/y", # this one does not need surrounding spaces
  + "x^y", # this one does not need surrounding spaces
  + "x +",
  + "y",
  + "z[1",
  + "< 2]",
  + "x <- -2",
  + "2 + !TRUE",
  + "",
  + ## Parentheses
  + "sum(x)",
  + "1 + (x + y)",
  + "1 + ((x + y) * z)",
  + "1 + (z/(x + y))",
  + "1 + (z^(x + y))",
  + "1 + (sum(1:10))",
  + "1 + ((sum(1:10)))",
  + "if (x > 0) x + y",
  + "for (i in seq_along(z)) x[i] <- x[i] + 2",
  + "while (x < 2) x + 2",
  + "switch(2, 2 + 2, c(sum(x), diff(z)))",
  + "foo <- function(x) x^2",
  + "",
  + ## Square brackets
  + "z[1]",
  + "U <- matrix(1:4, ncol = 2)",
  + "U[2, ]",
  + "",
  + ## Commas
  + "paste('Hello',",
  + "    ' World')",
  + "A <- array(24, 2:4)",
  + "A[1, , ]",
  + "A[, 1, ]",
  + "A[, , 1]",
  + "A[1, 1, ]",
  + "A[1, , 1]",
  + "A[, 1, 1]",
  + ## Trailing whitespace
  + "## There should be no whitespaces at the end of a line",
  + "",
  + ## Trailing blank lines
  + "## There should be no trailing blank lines in a file",
  + file = VALID_STYLE_FILE, sep = "\n")
  > VALID_STYLE <- getSourceData(VALID_STYLE_FILE)
  > 
  > ## R bracing style
  > VALID_BRACE_R_FILE <- tempfile(fileext = ".R")
  > cat(
  + "## Correct use of R style for braces",
  + "foo <- function(x, y)",
  + "{",
  + "    if (x > 2)",
  + "    {",
  + "        x^2 + y^3",
  + "    }",
  + "    else",
  + "    {",
  + "        z <- 3",
  + "        x^2 + y^3 + z^4",
  + "    }",
  + "",
  + "    {",
  + "        2 + 3",
  + "    }",
  + "}",
  + "",
  + "function(x, y)",
  + "{",
  + "    2 + 3",
  + "}",
  + "",
  + "{",
  + "    2 + 3",
  + "}",
  + file = VALID_BRACE_R_FILE, sep = "\n")
  > VALID_BRACE_R <- getSourceData(VALID_BRACE_R_FILE)
  > 
  > ## 1TBS bracing style
  > VALID_BRACE_1TBS_FILE <- tempfile(fileext = ".R")
  > cat(
  + "## Correct use of 1TBS style for braces",
  + "bar <- function(x, y = 42) {",
  + "    if (x < y) {",
  + "        x + y",
  + "    } else {",
  + "        x - y",
  + "    }",
  + "}",
  + "",
  + "function(x, y) {",
  + "    2 + 3",
  + "}",
  + file = VALID_BRACE_1TBS_FILE, sep = "\n")
  > VALID_BRACE_1TBS <- getSourceData(VALID_BRACE_1TBS_FILE)
  > 
  > ## Comments
  > VALID_COMMENTS_FILE <- tempfile(fileext = ".R")
  > cat(file = VALID_COMMENTS_FILE, '
  + ### comment
  + 2 + 3 # comment
  + 42    ## 42
  + a     ###            a
  + ##
  + ## a
  + #!
  + #! a
  + #"
  + #" a
  + #$
  + #$ a
  + #%
  + #% a
  + #&
  + #& a
  + #(
  + #( a
  + #)
  + #) a
  + #*
  + #* a
  + #+
  + #+ a
  + #,
  + #, a
  + #-
  + #- a
  + #.
  + #. a
  + #/
  + #/ a
  + #:
  + #: a
  + #;
  + #; a
  + #<
  + #< a
  + #=
  + #= a
  + #>
  + #> a
  + #?
  + #? a
  + #@
  + #@ a
  + #[
  + #[ a
  + #\
  + #\ a
  + #]
  + #] a
  + #^
  + #^ a
  + #_
  + #_ a
  + #`
  + #` a
  + #{
  + #{ a
  + #|
  + #| a
  + #}
  + #} a
  + #~
  + #~ a
  + ')
  > VALID_COMMENTS <- getSourceData(VALID_COMMENTS_FILE)
  > 
  > ## Magic numbers
  > VALID_NOMAGIC_FILE <- tempfile(fileext = ".R")
  > cat(
  + "SIZE <- 42",
  + "BAR <- 2^32",
  + "BAZ <- 2^32 - 1",
  + "FOOBAR0 <- 1234",
  + "FOO_BAR42 <- 32 - 1",
  + "FOO.BAR.1 <- 32 - 1",
  + "BÃBÃ <- 42",
  + "ÃA_1 <- 32 - 1",
  + "ÃÃÃ.2 <- 2^32 - 1",
  + "42 -> SIZE",
  + "32 - 1 -> ÃA_1",
  + "2^32 - 1 -> ÃÃÃ.2",
  + "",
  + "x <- rnorm(SIZE)",
  + "x[1]",
  + "x[1] * 2",
  + "x[33]",
  + "x[-1] - x[-SIZE] == -1L",
  + "x * 100",
  + "for (i in 1:SIZE) x[1]",
  + "x <- numeric(0)",
  + "",
  + "x <- Inf",
  + "x <- NA",
  + "x <- NaN",
  + file = VALID_NOMAGIC_FILE, sep = "\n")
  > VALID_NOMAGIC <- getSourceData(VALID_NOMAGIC_FILE)
  Error in parse(file, encoding = encoding, keep.source = keep.source) : 
    D:\temp\RtmpoTZNt9\file195d83b753f10.R:7:2: unexpected input
  6: FOO.BAR.1 <- 32 - 1
  7: BÃ
      ^
  Calls: getSourceData -> getParseData -> parse
  Execution halted