File: test_showUtils.R

package info (click to toggle)
r-bioc-biocbaseutils 1.8.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 196 kB
  • sloc: makefile: 2
file content (33 lines) | stat: -rw-r--r-- 621 bytes parent folder | download | duplicates (2)
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
expect_identical(
    length(selectSome(letters, maxToShow = 5)), 5L
)

expect_identical(
    length(selectSome(letters, maxToShow = 3)), 3L
)

expect_true(
    "??" %in% selectSome(letters, ellipsis = "??", maxToShow = 5)
)

expect_identical(
    match("??", selectSome(letters, ellipsis = "??")), 3L
)

expect_identical(
    match("??",
        selectSome(
            letters, ellipsis = "??", ellipsisPos = "start", maxToShow = 3
        )
    ),
    1L
)

expect_identical(
    match("??",
          selectSome(
              letters, ellipsis = "??", ellipsisPos = "end", maxToShow = 5L
          )
    ),
    5L
)