x <- c(seq.int(0, 10, 0.5), NA)
bsMat <- bSpline(x)
ibsMat <- ibs(x)
dbsMat <- dbs(x)
msMat <- mSpline(x)
isMat <- iSpline(x)
csMat1 <- cSpline(x)
csMat2 <- cSpline(x, scale = FALSE)
bpMat <- bernsteinPoly(x)
nsMat <- naturalSpline(x, df = 3)

## with newx
expect_equivalent(predict(bsMat, 1), bsMat[3L, , drop = FALSE])
expect_equivalent(predict(ibsMat, 1), ibsMat[3L, , drop = FALSE])
expect_equivalent(predict(dbsMat, 1), dbsMat[3L, , drop = FALSE])
expect_equivalent(predict(msMat, 1), msMat[3L, , drop = FALSE])
expect_equivalent(predict(isMat, 1), isMat[3L, , drop = FALSE])
expect_equivalent(predict(csMat1, 1), csMat1[3L, , drop = FALSE])
expect_equivalent(predict(csMat2, 1), csMat2[3L, , drop = FALSE])
expect_equivalent(predict(bpMat, 1), bpMat[3L, , drop = FALSE])
expect_equivalent(predict(nsMat, 1), nsMat[3L, , drop = FALSE])

## without newx
expect_equivalent(predict(bsMat), bsMat)
expect_equivalent(predict(ibsMat), ibsMat)
expect_equivalent(predict(dbsMat), dbsMat)
expect_equivalent(predict(msMat), msMat)
expect_equivalent(predict(isMat), isMat)
expect_equivalent(predict(csMat1), csMat1)
expect_equivalent(predict(csMat2), csMat2)
expect_equivalent(predict(bpMat), bpMat)
expect_equivalent(predict(nsMat), nsMat)
