on master help sign in
added unicode to SelfTest directories
commit86d07745a5987c2624c5a4232dbdbf6b0dcb368c authorOwen Shepherd <414owen@gmail.com> dateMon 23 Dec 2019, 17:55 (7 years ago) parentcbe1900
2 files changed+7−4
lib/selftest/src/Obelisk/SelfTest.hs+3−4 out+4
lib/selftest/src/Obelisk/SelfTest.hs+3−4
@@ -24,7 +24,6 @@ import Shelly
2424import System.Directory (withCurrentDirectory, getDirectoryContents)
2525import System.Environment
2626import System.Exit (ExitCode (..))
27−import System.Info
2827import System.IO (Handle, hClose)
2928import System.IO.Temp
3029import System.Process (readProcessWithExitCode, CreateProcess(cwd), readCreateProcessWithExitCode, proc)
@@ -81,7 +80,7 @@ main = do
8180 obeliskImpl <- fromString <$> getEnv "OBELISK_IMPL"
8281 httpManager <- HTTP.newManager HTTP.defaultManagerSettings
8382 [p0, p1, p2, p3] <- liftIO $ getFreePorts 4
84− withSystemTempDirectory "initCache" $ \initCache -> do
83+ withSystemTempDirectory "init Cache λ" $ \initCache -> do
8584 -- Setup the ob init cache
8685 void . shellyOb verbosity $ chdir (fromString initCache) $ do
8786 run_ "ob" ["init"]
@@ -92,7 +91,7 @@ main = do
9291 inTmp :: (Shelly.FilePath -> Sh a) -> IO ()
9392 inTmp f = withTmp (chdir <*> f)
9493
95− withTmp f = shelly_ . withSystemTempDirectory "test" $ f . fromString
94+ withTmp f = shelly_ . withSystemTempDirectory "test λ" $ f . fromString
9695
9796 inTmpObInit f = inTmp $ \dir -> do
9897 run_ "cp" ["-a", fromString $ initCache <> "/.", toTextIgnore dir]
@@ -119,7 +118,7 @@ main = do
119118 it "works with default impl" $ inTmp $ \_ -> run "ob" ["init"]
120119 it "works with master branch impl" $ inTmp $ \_ -> run "ob" ["init", "--branch", "master"]
121120 it "works with symlink" $ inTmp $ \_ -> run "ob" ["init", "--symlink", obeliskImpl]
122− it "doesn't silently overwrite existing files" $ withSystemTempDirectory "ob-init" $ \dir -> do
121+ it "doesn't silently overwrite existing files" $ withSystemTempDirectory "ob-init λ" $ \dir -> do
123122 let p force = (proc "ob" $ "--no-handoff" : "init" : ["--force"|force]) { cwd = Just dir }
124123 (ExitSuccess, _, _) <- readCreateProcessWithExitCode (p False) ""
125124 (ExitFailure _, _, _) <- readCreateProcessWithExitCode (p False) ""
outnew file+4
@@ -0,0 +1,4 @@
1+Tests may take longer to run if there are unbuilt derivations: use -v for verbose output
2+
3+ob init
4+