@@ -7,6 +7,7 @@ import scala.language.unsafeNulls
7
7
import java .nio .file .Paths
8
8
import org .junit .{Test , AfterClass }
9
9
import org .junit .Assert .assertEquals
10
+ import org .junit .Assume .assumeFalse
10
11
import org .junit .experimental .categories .Category
11
12
12
13
import vulpix .TestConfiguration
@@ -84,30 +85,35 @@ class BashScriptsTests:
84
85
85
86
/* verify that `dist/bin/scala` correctly passes args to the jvm via -J-D for script envtest.sc */
86
87
@ Test def verifyScJProperty =
88
+ assumeFalse(" Scripts do not yet support Scala 2 library TASTy" , Properties .usingScalaLibraryTasty)
87
89
val tag = " World1"
88
90
val stdout = callScript(tag, envtestSc, s " -J-Dkey " )
89
91
assertEquals( s " Hello $tag" , stdout)
90
92
91
93
/* verify that `dist/bin/scala` correctly passes args to the jvm via -J-D for script envtest.scala */
92
94
@ Test def verifyScalaJProperty =
95
+ assumeFalse(" Scripts do not yet support Scala 2 library TASTy" , Properties .usingScalaLibraryTasty)
93
96
val tag = " World2"
94
97
val stdout = callScript(tag, envtestScala, s " -J-Dkey " )
95
98
assertEquals(s " Hello $tag" , stdout)
96
99
97
100
/* verify that `dist/bin/scala` can set system properties via -D for envtest.sc */
98
101
@ Test def verifyScDProperty =
102
+ assumeFalse(" Scripts do not yet support Scala 2 library TASTy" , Properties .usingScalaLibraryTasty)
99
103
val tag = " World3"
100
104
val stdout = callScript(tag, envtestSc, s " -Dkey " )
101
105
assertEquals(s " Hello $tag" , stdout)
102
106
103
107
/* verify that `dist/bin/scala` can set system properties via -D for envtest.scala */
104
108
@ Test def verifyScalaDProperty =
109
+ assumeFalse(" Scripts do not yet support Scala 2 library TASTy" , Properties .usingScalaLibraryTasty)
105
110
val tag = " World4"
106
111
val stdout = callScript(tag, envtestScala, s " -Dkey " )
107
112
assertEquals(s " Hello $tag" , stdout)
108
113
109
114
/* verify that `dist/bin/scala` can set system properties via -D when executing compiled script via -jar envtest.jar */
110
115
@ Test def saveAndRunWithDProperty =
116
+ assumeFalse(" Scripts do not yet support Scala 2 library TASTy" , Properties .usingScalaLibraryTasty)
111
117
val commandline = Seq (" SCALA_OPTS= " , scalaPath.relpath, " -save" , envtestScala.relpath).mkString(" " )
112
118
val (_, _, _, _) = bashCommand(commandline) // compile jar, discard output
113
119
val testJar = testFile(" envtest.jar" ) // jar is created by the previous bashCommand()
@@ -125,6 +131,7 @@ class BashScriptsTests:
125
131
126
132
/* verify `dist/bin/scalac` non-interference with command line args following script name */
127
133
@ Test def verifyScalacArgs =
134
+ assumeFalse(" Scripts do not yet support Scala 2 library TASTy" , Properties .usingScalaLibraryTasty)
128
135
val commandline = (Seq (" SCALA_OPTS= " , scalacPath, " -script" , showArgsScript) ++ testScriptArgs).mkString(" " )
129
136
val (validTest, exitCode, stdout, stderr) = bashCommand(commandline)
130
137
if verifyValid(validTest) then
@@ -140,6 +147,7 @@ class BashScriptsTests:
140
147
141
148
/* verify `dist/bin/scala` non-interference with command line args following script name */
142
149
@ Test def verifyScalaArgs =
150
+ assumeFalse(" Scripts do not yet support Scala 2 library TASTy" , Properties .usingScalaLibraryTasty)
143
151
val commandline = (Seq (" SCALA_OPTS= " , scalaPath, showArgsScript) ++ testScriptArgs).mkString(" " )
144
152
val (validTest, exitCode, stdout, stderr) = bashCommand(commandline)
145
153
if verifyValid(validTest) then
@@ -159,6 +167,7 @@ class BashScriptsTests:
159
167
*/
160
168
@ Category (Array (classOf [BootstrappedOnlyTests ]))
161
169
@ Test def verifyScriptPathProperty =
170
+ assumeFalse(" Scripts do not yet support Scala 2 library TASTy" , Properties .usingScalaLibraryTasty)
162
171
val scriptFile = testFiles.find(_.getName == " scriptPath.sc" ).get
163
172
val expected = s " ${scriptFile.getName}"
164
173
printf(" ===> verify valid system property script.path is reported by script [%s]\n " , scriptFile.getName)
@@ -175,6 +184,7 @@ class BashScriptsTests:
175
184
* verify SCALA_OPTS can specify an @argsfile when launching a scala script in `dist/bin/scala`.
176
185
*/
177
186
@ Test def verifyScalaOpts =
187
+ assumeFalse(" Scripts do not yet support Scala 2 library TASTy" , Properties .usingScalaLibraryTasty)
178
188
val scriptFile = testFiles.find(_.getName == " classpathReport.sc" ).get
179
189
printf(" ===> verify SCALA_OPTS='@argsfile' is properly handled by `dist/bin/scala`\n " )
180
190
val envPairs = List ((" SCALA_OPTS" , s " @ $argsfile" ))
@@ -197,6 +207,7 @@ class BashScriptsTests:
197
207
* verify that individual scripts can override -save with -nosave (needed to address #13760).
198
208
*/
199
209
@ Test def sqlDateTest =
210
+ assumeFalse(" Scripts do not yet support Scala 2 library TASTy" , Properties .usingScalaLibraryTasty)
200
211
val scriptBase = " sqlDateError"
201
212
val scriptFile = testFiles.find(_.getName == s " $scriptBase.sc " ).get
202
213
val testJar = testFile(s " $scriptBase.jar " ) // jar should not be created when scriptFile runs
@@ -221,6 +232,7 @@ class BashScriptsTests:
221
232
* verify -e println("yo!") works.
222
233
*/
223
234
@ Test def verifyCommandLineExpression =
235
+ assumeFalse(" Scripts do not yet support Scala 2 library TASTy" , Properties .usingScalaLibraryTasty)
224
236
printf(" ===> verify -e <expression> is properly handled by `dist/bin/scala`\n " )
225
237
val expected = " 9"
226
238
val expression = s " println(3*3) "
0 commit comments