Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mirrors
biopet.biopet
Commits
2be6cdd6
Commit
2be6cdd6
authored
Oct 17, 2016
by
Sander Bollen
Browse files
trimmed VersionCommand and test class
parent
0358aae4
Changes
2
Hide whitespace changes
Inline
Side-by-side
biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Cnmops.scala
View file @
2be6cdd6
...
...
@@ -32,8 +32,11 @@ class Cnmops(val root: Configurable) extends RscriptCommandLineFunction with Ver
protected
var
script
:
File
=
new
File
(
"/nl/lumc/sasc/biopet/extensions/cnmops.R"
)
def
versionCommand
=
super
.
cmdLine
+
"--version"
def
versionRegex
=
"\\d+\\.\\d+\\.\\d+"
.
r
def
versionCommand
=
{
val
v
=
super
.
cmdLine
+
"--version"
v
.
trim
.
replace
(
"'"
,
""
)
}
def
versionRegex
=
"(\\d+\\.\\d+\\.\\d+)"
.
r
private
def
stringToInt
(
s
:
String
)
:
Option
[
Int
]
=
{
try
{
...
...
biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/CnmopsTest.scala
0 → 100644
View file @
2be6cdd6
package
nl.lumc.sasc.biopet.extensions
import
org.scalatest.Matchers
import
org.scalatest.testng.TestNGSuite
import
org.testng.annotations.Test
/**
* Created by Sander Bollen on 17-10-16.
*/
class
CnmopsTest
extends
TestNGSuite
with
Matchers
{
@Test
def
testVersionCommand
()
=
{
val
cn
=
new
Cnmops
(
null
)
cn
.
versionCommand
.
endsWith
(
"--version"
)
shouldBe
true
cn
.
versionCommand
.
startsWith
(
"'Rscript'"
)
shouldBe
true
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment