The R Project SVN R

Rev

Rev 80009 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 80009 Rev 89296
Line 30... Line 30...
30
tryCatch(
30
tryCatch(
31
  tools:::find_wide_Rd_lines_in_Rd_object(rd, installed = FALSE),
31
  tools:::find_wide_Rd_lines_in_Rd_object(rd, installed = FALSE),
32
  error = function(e) err <<- e
32
  error = function(e) err <<- e
33
)
33
)
34
stopifnot(!is.null(err))
34
stopifnot(!is.null(err))
-
 
35
 
-
 
36
 
-
 
37
## Rdiff(nullPointers=TRUE) did not convert glibc's (nil) and so
-
 
38
## reported false positive differences if <pointer: (nil)> was not
-
 
39
## a leading substring
-
 
40
RdiffLines <- function(txt0, txt1) {
-
 
41
    con0 <- textConnection(txt0)
-
 
42
    con1 <- textConnection(txt1)
-
 
43
    on.exit({ close(con0); close(con1) })
-
 
44
    Rdiff(con0, con1, Log = TRUE)
-
 
45
}
-
 
46
txt0 <- c(LETTERS, "<pointer: (nil)>", "... <pointer: (nil)>", letters)
-
 
47
txt1 <- c(LETTERS, "<pointer: 0xfff>", "... <pointer: 0xfff>", letters)
-
 
48
L <- RdiffLines(txt0, txt1) # previous output:
-
 
49
## 
-
 
50
## 27c27
-
 
51
## < ... <pointer: (nil)>
-
 
52
## ---
-
 
53
## > ... <pointer: 0>
-
 
54
stopifnot(identical(L, list(status = 0L, out = character(0L))))