This file is indexed.

/usr/lib/R/site-library/gtable/tests/test-bind.r is in r-cran-gtable 0.1.2-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
context("Bind")

test_that("Number of rows grow with rbind", {
  
  lay1 <- gtable_add_rows(gtable(), cm)
  lay2 <- gtable_add_rows(gtable(), rep(cm, 2))
  
  expect_that(nrow(rbind(lay1, lay2)), equals(3))
  expect_that(nrow(rbind(lay2, lay1)), equals(3))
})

test_that("Number of cols grow with cbind", {

  lay1 <- gtable_add_cols(gtable(), cm)
  lay2 <- gtable_add_cols(gtable(), rep(cm, 2))
  
  expect_that(ncol(cbind(lay1, lay2)), equals(3))
  expect_that(ncol(cbind(lay2, lay1)), equals(3))
})

test_that("Heights and widths vary with size parameter", {
  col1 <- gtable_col("col1", list(grob1), cm, cm)
  col2 <- gtable_col("col1", list(grob1), cm2, cm2)

  expect_equal(cbind(col1, col2, size = "first")$heights, cm)
  expect_equal(cbind(col1, col2, size = "last")$heights, cm2)
  expect_equal(cbind(col1, col2, size = "min")$heights, cm)
  expect_equal(cbind(col1, col2, size = "max")$heights, cm2)

  expect_equal(rbind(col1, col2, size = "first")$widths, cm)
  expect_equal(rbind(col1, col2, size = "last")$widths, cm2)
  expect_equal(rbind(col1, col2, size = "min")$widths, cm)
  expect_equal(rbind(col1, col2, size = "max")$widths, cm2)
})