This file is indexed.

/usr/lib/R/site-library/igraph/tests/test_operators3.R is in r-cran-igraph 0.7.1-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
context("infix operators")

test_that("infix operators work", {

  library(igraph)

  g <- graph.ring(10)
  V(g)$name <- letters[1:10]
  E(g)$name <- LETTERS[1:10]

  g <- g - c("a", "b")
  expect_that(vcount(g), equals(8))
  expect_that(ecount(g), equals(7))
  expect_that(graph.isomorphic(g, graph.lattice(8)), is_true())

  g <- g - edge("e|f")
  expect_that(graph.isomorphic(g, graph.lattice(5) + graph.lattice(3)),
              is_true())

  g <- g - edge("H")
  expect_that(graph.isomorphic(g, graph.formula(a-b-c, d-e-f, g-h)),
              is_true())

  g <- graph.ring(10)
  V(g)$name <- letters[1:10]

  g <- g - path("a", "b", "c", "d")
  expect_that(graph.isomorphic(g, graph.lattice(8) + 2), is_true())

  expect_that(graph.isomorphic(g - V(g)[c('d', 'g')],
                               graph.lattice(4) + graph.lattice(2) + 2),
              is_true())

  expect_that(graph.isomorphic(g - E(g)['f' %--% 'g'],
                               graph.lattice(5) + graph.lattice(3) + 2),
              is_true())

})