File: test_env_B.R

package info (click to toggle)
r-cran-tinytest 1.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,072 kB
  • sloc: sh: 14; makefile: 2
file content (17 lines) | stat: -rw-r--r-- 471 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

# The "hihihaha" environment variable was set in test_env_A and should be unset
# now.
expect_equal(Sys.getenv("hihihaha"), "")

# The "hihihaha" option was set in test_env_A and should be unset now
expect_true(is.null(getOption("hihihaha")))

expect_equal(Sys.getenv("hoho"), "")
expect_true( is.null(getOption("hoho")) )

# Surviving envvars and options
expect_equal(Sys.getenv("hehe"), "3")
Sys.unsetenv("hehe")
expect_equal(getOption("hehe"), 3)
options(hehe=NULL)