This file is indexed.

/usr/share/doc/r-cran-plyr/tests/testthat/test-inform.r is in r-cran-plyr 1.8.4-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
context("Informative messages")

test_that(".inform parameter works for all l?ply functions", {
  funcnames <- ls(name = asNamespace("plyr"), pattern = "^l[^i]ply$")

  old_options <- options(show.error.messages = FALSE)
  on.exit(options(old_options), add = TRUE)

  input <- 1:10
  for (funcname in funcnames) {
    func <- get(funcname, asNamespace("plyr"))
    expect_error(func(input, function(...) stop("qq"), .inform = TRUE), "piece 1", info = funcname)
  }
})

test_that(".inform parameter works for all d?ply functions", {
  funcnames <- ls(name = asNamespace("plyr"), pattern = "^d[^i]ply$")

  old_options <- options(show.error.messages = FALSE)
  on.exit(options(old_options), add = TRUE)

  input <- data.frame(a = 1:10)
  for (funcname in funcnames) {
    func <- get(funcname, asNamespace("plyr"))
    expect_error(func(input, .(), function(...) stop("qq"), .inform = TRUE), "piece 1", info = funcname)
  }
})

test_that(".inform parameter works for all a?ply functions", {
  funcnames <- ls(name = asNamespace("plyr"), pattern = "^a[^i]ply$")

  old_options <- options(show.error.messages = FALSE)
  on.exit(options(old_options), add = TRUE)

  input <- data.frame(a = 1:10)
  for (funcname in funcnames) {
    func <- get(funcname, asNamespace("plyr"))
    expect_error(func(input, 1, function(...) stop("qq"), .inform = TRUE), "piece 1", info = funcname)
  }
})

test_that(".inform parameter works for all m?ply functions", {
  funcnames <- ls(name = asNamespace("plyr"), pattern = "^m[^i]ply$")

  old_options <- options(show.error.messages = FALSE)
  on.exit(options(old_options), add = TRUE)

  input <- data.frame(a = 1:10)
  for (funcname in funcnames) {
    func <- get(funcname, asNamespace("plyr"))
    expect_error(func(input, function(...) stop("qq"), .inform = TRUE), "piece 1", info = funcname)
  }
})