- Added Process.getPid() and Terminal.isTerminal().

- Added a test command-line app.
This commit is contained in:
Adam Murdoch
2012-07-29 17:05:06 +10:00
parent 1d56f93e64
commit c009527afa
12 changed files with 141 additions and 25 deletions

View File

@@ -0,0 +1,16 @@
package net.rubygrapefruit.platform
import org.junit.Rule
import org.junit.rules.TemporaryFolder
import spock.lang.Specification
class TerminalTest extends Specification {
@Rule TemporaryFolder tmpDir
final Terminal terminal = Platform.get(Terminal.class)
def "can check if attached to terminal"() {
expect:
!terminal.isTerminal(Terminal.Output.Stdout);
!terminal.isTerminal(Terminal.Output.Stderr);
}
}