Skip to content

Commit

Permalink
Better tmp file creation
Browse files Browse the repository at this point in the history
  • Loading branch information
jpsacha committed May 13, 2023
1 parent 1e28762 commit 0265b46
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2014-2022 Jarek Sacha (jpsacha -at- gmail.com)
* Copyright 2014-2023 Jarek Sacha (jpsacha -at- gmail.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -19,12 +19,12 @@ package net.ij_plugins.sf.sbt.install4j
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers.*

import java.io.File
import java.nio.file.Files

class DefaultsTest extends AnyFlatSpec {

it should "determine install4jHomeDir from environment variable" in {
val f = File.createTempFile("_env_", "_env_")
val f = Files.createTempFile("_env_", "_env_").toFile
val path_name = f.getCanonicalPath
System.setProperty(Defaults.INSTALL4J_HOME_ENV, path_name)

Expand All @@ -34,7 +34,7 @@ class DefaultsTest extends AnyFlatSpec {
}

it should "determine install4jCompilerFile from environment variable" in {
val f = File.createTempFile("_env_", "_env_")
val f = Files.createTempFile("_env_", "_env_").toFile
val path_name = f.getCanonicalPath
System.setProperty(Defaults.INSTALL4JC_FILE_ENV, path_name)

Expand Down

0 comments on commit 0265b46

Please sign in to comment.