Advertisement
Guest User

test

a guest
Apr 18th, 2015
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.91 KB | None | 0 0
  1. print("This program will test the proposed 'users' module.")
  2.  
  3. if users.isUser("unit") then
  4.  users.deleteUser("unit")
  5.  print()
  6. end
  7.  
  8. print("Testing users.isUser")
  9. print("This SHOULD return false, since the 'unit' user has not been created yet.")
  10. print()
  11. print('users.isUser("unit") >> '..tostring(users.isUser(unit)))
  12. print()
  13. print()
  14. sleep(1)
  15. print("Testing users.newUser")
  16. print("This should return true, since the user 'unit' has not been created yet.")
  17. print('users.newUser("unit", "unit") >> '..tostring(users.newUser('unit', 'unit')))
  18. print()
  19. print()
  20. sleep(1)
  21. print("Testing users.login")
  22. print("This should return true, since the login should be successful.")
  23. print('users.login("unit", "unit") >> '..tostring(users.login("unit", "unit")))
  24. print()
  25. print()
  26. sleep(1)
  27. print("Testing users.getHome")
  28. print("It should return '/home/unit'")
  29. print('users.getHome("unit") >> '..tostring(users.getHome("unit")))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement