This repository was archived by the owner on Mar 22, 2021. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ import qualified System.Environment as Env
3030import qualified System.Info as Info
3131import qualified System.IO.Temp as Temp
3232
33- -- | Pushes the @text @ module to the lua stack.
33+ -- | Pushes the @system @ module to the Lua stack.
3434pushModule :: Lua NumResults
3535pushModule = do
3636 Lua. newtable
@@ -51,8 +51,8 @@ pushModule = do
5151 addFunction " with_tmpdir" with_tmpdir
5252 return 1
5353
54- -- | Add the text module under the given name to the table of preloaded
55- -- packages.
54+ -- | Add the @system@ module under the given name to the table of
55+ -- preloaded packages.
5656preloadModule :: String -> Lua ()
5757preloadModule = flip addPackagePreloader pushModule
5858
Original file line number Diff line number Diff line change 11--
2- -- Tests for the hstext module
2+ -- Tests for the system module
33--
44local system = require ' system'
55
Original file line number Diff line number Diff line change @@ -28,18 +28,18 @@ tests = testGroup "HsLua System module"
2828 [ testCase " system module can be pushed to the stack" $
2929 Lua. run (void pushModule)
3030
31- , testCase " text module can be added to the preloader" . Lua. run $ do
31+ , testCase " system module can be added to the preloader" . Lua. run $ do
3232 Lua. openlibs
3333 preloadModule " system"
3434 assertEqual' " function not added to preloader" Lua. TypeFunction =<< do
3535 Lua. getglobal' " package.preload.system"
3636 Lua. ltype (- 1 )
3737
38- , testCase " text module can be loaded as hstext " . Lua. run $ do
38+ , testCase " system module can be loaded as hssystem " . Lua. run $ do
3939 Lua. openlibs
40- preloadModule " system "
40+ preloadModule " hssystem "
4141 assertEqual' " loading the module fails " Lua. OK =<<
42- Lua. dostring " require 'system '"
42+ Lua. dostring " require 'hssystem '"
4343
4444 , testCase " Lua tests pass" . Lua. run $ do
4545 Lua. openlibs
You can’t perform that action at this time.
0 commit comments