Clean up AppVeyor scripts (#126)
[packages/Win32.git] / tests / registry001.hs
1 import System.Win32
2 import Control.Exception
3 import Control.Monad
4
5 x = "bumble"
6 name = "test_registry001"
7
8 -- Create, read, and delete a value (test for bug #3241)
9 main = do
10 k1 <- regCreateKey hKEY_CURRENT_USER "Software"
11 k2 <- regCreateKey k1 "Haskell"
12 k3 <- regCreateKey k2 "GHC"
13 flip finally (regDeleteValue k3 name) $ do
14 regSetStringValue k3 name x
15 r <- regQueryDefaultValue k3 name
16 print r