% タイトル
% 作者
見出し1です。試しに書いてみます。
import spock.lang.Specification | |
class HeaderSpec extends Specification { | |
def "header characterization test"() { | |
when: | |
def proc = "pandoc header.md -o header.html".execute() | |
proc.waitFor() | |
then: | |
def result = new File("header.html").getText('UTF-8') | |
"""<h1 id="header-test">Header Test</h1> |
import spock.lang.Specification | |
class HeaderSpec extends Specification { | |
def "header characterization test"() { | |
when: | |
def proc = "pandoc header.md -o header.html".execute() | |
proc.waitFor() | |
then: | |
def result = new File("header.html").getText('UTF-8') | |
"""<h1 id="header-test">Header Test</h1> |
import spock.lang.Specification | |
class HeaderSpec extends Specification { | |
def "header characterization test"() { | |
when: | |
def proc = "pandoc header.md -o header.html".execute() | |
proc.waitFor() | |
then: | |
def result = new File("header.html").getText('UTF-8') | |
"" == result |
def proc = "pandoc -v".execute() | |
proc.waitFor() | |
println proc.in.text | |
// if you just want stdout of the command, you can write as: | |
println "pandoc -v".execute().text |
import spock.lang.Specification | |
class SampleSpec extends Specification { | |
def "test sample"() { | |
expect: | |
def value = 2 | |
value == 2 | |
} | |
} |
import spock.lang.Specification | |
class SampleSpec extends Specification { | |
def "test sample"() { | |
expect: | |
def value = 1 | |
value == 2 | |
} | |
} |
apply plugin: 'java' | |
apply plugin: 'groovy' | |
apply plugin: 'eclipse' | |
repositories { mavenCentral() } | |
dependencies { | |
compile "org.codehaus.groovy:groovy-all:2.0.7" | |
testCompile 'org.spockframework:spock-core:0.7-groovy-2.0' | |
} |
project.ext.tempDir = 'tmp' | |
project.ext.targetEclipseDir = 'd:/eclipseGroovy' | |
ant.condition(property: "os", value: "windows") { os(family: "windows") } | |
ant.condition(property: "os", value: "unix" ) { os(family: "unix") } | |
task clean << { delete 'tmp' } | |
task installEclipse << { | |
new File(tempDir).mkdirs() |
apply plugin: 'java' | |
apply plugin: 'groovy' | |
apply plugin: 'eclipse' | |
repositories { mavenCentral() } | |
dependencies { | |
compile "org.codehaus.groovy:groovy-all:2.0.7" | |
testCompile 'org.spockframework:spock-core:0.7-groovy-2.0' | |
} |