@@ -58,7 +58,7 @@ class BashScriptsTests:
58
58
59
59
/* verify `dist/bin/scala` non-interference with command line args following script name */
60
60
@ Test def verifyScalaArgs =
61
- val commandline = (Seq (" SCALA_OPTS= " ,scalaPath, showArgsScript) ++ testScriptArgs).mkString(" " )
61
+ val commandline = (Seq (" SCALA_OPTS= " , scalaPath, showArgsScript) ++ testScriptArgs).mkString(" " )
62
62
val (validTest, exitCode, stdout, stderr) = bashCommand(commandline)
63
63
if validTest then
64
64
var fail = false
@@ -78,7 +78,7 @@ class BashScriptsTests:
78
78
*/
79
79
@ Test def verifyScriptPathProperty =
80
80
val scriptFile = testFiles.find(_.getName == " scriptPath.sc" ).get
81
- val expected = s " / ${scriptFile.getName}"
81
+ val expected = s " ${scriptFile.getName}"
82
82
printf(" ===> verify valid system property script.path is reported by script [%s]\n " , scriptFile.getName)
83
83
printf(" calling scriptFile: %s\n " , scriptFile)
84
84
val (validTest, exitCode, stdout, stderr) = bashCommand(scriptFile.absPath)
@@ -105,7 +105,7 @@ class BashScriptsTests:
105
105
if valid then printf(s " \n ===> success: classpath begins with %s, as reported by [%s] \n " , workingDirectory, scriptFile.getName)
106
106
assert(valid, s " script ${scriptFile.absPath} did not report valid java.class.path first entry " )
107
107
108
- def existingPath : String = envOrElse(" PATH" ," " ).norm
108
+ def existingPath : String = envOrElse(" PATH" , " " ).norm
109
109
def adjustedPath = s " $javaHome/bin $psep$scalaHome/bin $psep$existingPath"
110
110
def pathEntries = adjustedPath.split(psep).toList
111
111
@@ -120,7 +120,7 @@ class BashScriptsTests:
120
120
def fixHome (s : String ): String =
121
121
s.startsWith(" ~" ) match {
122
122
case false => s
123
- case true => s.replaceFirst(" ~" ,userHome)
123
+ case true => s.replaceFirst(" ~" , userHome)
124
124
}
125
125
126
126
extension(s : String ) {
@@ -146,7 +146,7 @@ class BashScriptsTests:
146
146
def absPath : String = f.getAbsolutePath.norm
147
147
}
148
148
149
- lazy val psep : String = propOrElse(" path.separator" ," " )
149
+ lazy val psep : String = propOrElse(" path.separator" , " " )
150
150
lazy val osname = propOrElse(" os.name" , " " ).toLowerCase
151
151
152
152
lazy val scalacPath = s " $workingDirectory/dist/target/pack/bin/scalac " .norm
@@ -163,7 +163,7 @@ class BashScriptsTests:
163
163
// else, SCALA_HOME if defined
164
164
// else, not defined
165
165
lazy val scalaHome =
166
- if scalacPath.isFile then scalacPath.replaceAll(" /bin/scalac" ," " )
166
+ if scalacPath.isFile then scalacPath.replaceAll(" /bin/scalac" , " " )
167
167
else envOrElse(" SCALA_HOME" , " " ).norm
168
168
169
169
lazy val javaHome = envOrElse(" JAVA_HOME" , " " ).norm
@@ -172,7 +172,7 @@ class BashScriptsTests:
172
172
(" JAVA_HOME" , javaHome),
173
173
(" SCALA_HOME" , scalaHome),
174
174
(" PATH" , adjustedPath),
175
- ).filter { case (name,valu) => valu.nonEmpty }
175
+ ).filter { case (name, valu) => valu.nonEmpty }
176
176
177
177
lazy val whichBash : String =
178
178
var whichBash = " "
@@ -183,7 +183,7 @@ class BashScriptsTests:
183
183
184
184
whichBash
185
185
186
- def bashCommand (cmdstr : String , additionalEnvPairs: List [(String , String )] = Nil ): (Boolean , Int , Seq [String ], Seq [String ]) = {
186
+ def bashCommand (cmdstr : String , additionalEnvPairs : List [(String , String )] = Nil ): (Boolean , Int , Seq [String ], Seq [String ]) = {
187
187
var (stdout, stderr) = (List .empty[String ], List .empty[String ])
188
188
if bashExe.toFile.exists then
189
189
val cmd = Seq (bashExe, " -c" , cmdstr)
0 commit comments