File: test-getSplits.R

package info (click to toggle)
r-cran-quantmod 0.4.28-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 984 kB
  • sloc: makefile: 2
file content (10 lines) | stat: -rw-r--r-- 302 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
library(quantmod)

test.web.endpoints <- Sys.getenv("QUANTMOD_TEST_WEB_ENDPOINTS")

# Ensure getSplits() returns the expected ratio
if (nzchar(test.web.endpoints)) {
  aapl.spl <- as.numeric(getSplits("AAPL")["/2018"])
  expected <- c(0.5, 0.5, 0.5, 1/7)
  expect_true(all.equal(aapl.spl, expected))
}