# NOT RUN {
# Test that a user has chosen a correct menu item
#
omnitest(correctVal='Men in a college dorm.')
# Test that a user has entered a correct number at the
# command line
#
omnitest(correctVal=19)
# Test that a user has entered a particular command
#
omnitest('myVar <- c(3, 5, 7)')
# Test that a user has entered a command which computes
# a specific value but perhaps in a different manner
# than anticipated
#
omnitest('sd(x)^2', 5.95)
#
# If the user enters sd(x)*sd(x), rather than sd(x)^2, a notification
# will be issued, but the test will not fail.
# Test that a user has entered a command which computes
# a specific value in a particular way
#
omnitest('sd(x)^2', 5.95, strict=TRUE)
#
# In this case, if the user enters sd(x)*sd(x) the test will fail.
# }
Run the code above in your browser using DataLab