File tree 2 files changed +10
-2
lines changed 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,8 @@ module Development.IDE.Core.FileStore(
19
19
resetInterfaceStore ,
20
20
getModificationTimeImpl ,
21
21
addIdeGlobal ,
22
- getFileContentsImpl
22
+ getFileContentsImpl ,
23
+ getModTime
23
24
) where
24
25
25
26
import Control.Concurrent.STM (atomically )
@@ -31,7 +32,6 @@ import Control.Monad.IO.Class
31
32
import qualified Data.ByteString as BS
32
33
import Data.Either.Extra
33
34
import qualified Data.HashMap.Strict as HM
34
- import Data.Int (Int64 )
35
35
import qualified Data.Map.Strict as Map
36
36
import Data.Maybe
37
37
import qualified Data.Rope.UTF16 as Rope
Original file line number Diff line number Diff line change @@ -101,6 +101,7 @@ import qualified Language.LSP.Types as LSP
101
101
import Data.IORef.Extra (atomicModifyIORef_ )
102
102
import qualified Development.IDE.Plugin.HLS.GhcIde as Ghcide
103
103
import Text.Regex.TDFA ((=~) )
104
+ import Development.IDE.Core.FileStore (getModTime )
104
105
105
106
waitForProgressBegin :: Session ()
106
107
waitForProgressBegin = skipManyTill anyMessage $ satisfyMaybe $ \ case
@@ -5464,6 +5465,13 @@ unitTests = do
5464
5465
actualOrder <- liftIO $ readIORef orderRef
5465
5466
5466
5467
liftIO $ actualOrder @?= reverse [(1 :: Int ).. 20 ]
5468
+ , testCase " timestamps have subsecond resolution" $ do
5469
+ let f = " /tmp/ghcide-timestamp-test"
5470
+ writeFile f " "
5471
+ t <- getModTime f
5472
+ writeFile f " "
5473
+ t' <- getModTime f
5474
+ assertBool " Timestamps do not have subsecond resolution" (t /= t')
5467
5475
]
5468
5476
5469
5477
testIde :: IDE. Arguments -> Session () -> IO ()
You can’t perform that action at this time.
0 commit comments