/usr/lib/R/site-library/igraph/tests/test_graph.adjlist.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 | context("graph.adjlist")
test_that("graph.adjlist works", {
library(igraph)
g <- erdos.renyi.game(100, 3/100)
al <- get.adjlist(g)
g2 <- graph.adjlist(al, mode="all")
expect_that(graph.isomorphic(g, g2), is_true())
##
g <- erdos.renyi.game(100, 3/100, dir=TRUE)
al <- get.adjlist(g, mode="out")
g2 <- graph.adjlist(al, mode="out")
expect_that(graph.isomorphic(g, g2), is_true())
})
|