]> git.donarmstrong.com Git - rsem.git/blobdiff - EBSeq/BiocInstaller/unitTests/test_BiocUpgrade.R
Updated samtools to 0.1.19
[rsem.git] / EBSeq / BiocInstaller / unitTests / test_BiocUpgrade.R
diff --git a/EBSeq/BiocInstaller/unitTests/test_BiocUpgrade.R b/EBSeq/BiocInstaller/unitTests/test_BiocUpgrade.R
new file mode 100644 (file)
index 0000000..d4cb4e7
--- /dev/null
@@ -0,0 +1,29 @@
+test_useDevel <- function()
+{
+    if (!BiocInstaller:::IS_END_OF_LIFE) {
+        checkException(useDevel(), silent=TRUE)
+    } else if (!BiocInstaller:::IS_DOWNGRADEABLE) {
+        checkException(useDevel(FALSE), silent=TRUE)
+    }
+    if (!BiocInstaller:::IS_UPGRADEABLE) {
+        checkException(useDevel(), silent=TRUE)
+        opts <- options(warn=2); on.exit(options(opts))
+        checkException(biocLite("BiocUpgrade"))
+    }
+}
+
+test_getContribUrl_exist <- function()
+{
+    fun <- BiocInstaller:::.getContribUrl
+    
+    vers <- BiocInstaller:::BIOC_VERSION
+    checkTrue(grepl(vers, fun(vers)))
+    if (BiocInstaller:::IS_UPGRADEABLE) {
+        vers <- BiocInstaller:::UPGRADE_VERSION
+        checkTrue(grepl(vers, fun(vers)))
+    }
+    if (BiocInstaller:::IS_DOWNGRADEABLE) {
+        vers <- BiocInstaller:::DOWNGRADE_VERSION
+        checkTrue(grepl(vers, fun(vers)))
+    }
+}