From f430cda300e5be2855fbf7a2331ef745f5c7455d Mon Sep 17 00:00:00 2001 From: Amer Harb Date: Tue, 26 Sep 2023 22:29:51 +0200 Subject: [PATCH] test 2 --- .../test/kotlin/com/amerharb/atdate/MainTest.kt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/at-date-console/src/test/kotlin/com/amerharb/atdate/MainTest.kt b/at-date-console/src/test/kotlin/com/amerharb/atdate/MainTest.kt index 3c5b640..b24f66a 100644 --- a/at-date-console/src/test/kotlin/com/amerharb/atdate/MainTest.kt +++ b/at-date-console/src/test/kotlin/com/amerharb/atdate/MainTest.kt @@ -1,8 +1,8 @@ package com.amerharb.atdate // import java.awt.datatransfer.DataFlavor -// import java.awt.Toolkit -// import java.awt.datatransfer.StringSelection +import java.awt.Toolkit +import java.awt.datatransfer.StringSelection import java.io.ByteArrayOutputStream import java.io.InputStream import java.io.PrintStream @@ -291,7 +291,7 @@ class MainTest { @Test fun testCopyResult() { -// clearClipboard() + clearClipboard() // val systemInMock = InputStreamMock("0xa0\nc\nq") // System.setIn(systemInMock) // main(emptyArray()) @@ -320,7 +320,7 @@ class InputStreamMock(input: String) : InputStream() { // return clipboard.getData(DataFlavor.stringFlavor) as String // } // -// fun clearClipboard() { -// val clipboard = Toolkit.getDefaultToolkit().systemClipboard -// clipboard.setContents(StringSelection(""), null) -// } +fun clearClipboard() { + val clipboard = Toolkit.getDefaultToolkit().systemClipboard + clipboard.setContents(StringSelection(""), null) +}