# NOT RUN {
if (.Platform$OS.type == "unix") {
# this will return /full/path/to/bin
# or return an error for all values of util that are not "ls" and "pwd"
# or error if "ls" does not exist in "/bin"
.check_valid_util("ls", utils = c("ls", "pwd"), "/bin")
# }
# NOT RUN {
# This will throw error
.check_valid_util("badUtil", utils = c("ls", "pwd"), "/bin")
# }
# NOT RUN {
}
# }
Run the code above in your browser using DataLab