# NOT RUN {
stopifnot(glob2rx("abc.*") == "^abc\\.",
# }
# NOT RUN {
<!-- % '\\' doubled in Rd file! -->
# }
# NOT RUN {
          glob2rx("a?b.*") == "^a.b\\.",
          glob2rx("a?b.*", trim.tail = FALSE) == "^a.b\\..*$",
          glob2rx("*.doc") == "^.*\\.doc$",
          glob2rx("*.doc", trim.head = TRUE) == "\\.doc$",
          glob2rx("*.t*")  == "^.*\\.t",
          glob2rx("*.t??") == "^.*\\.t..$",
          glob2rx("*[*")  == "^.*\\["
)
# }
Run the code above in your browser using DataLab