GameCraft Mod Manager
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

68 lines
1.2KB

  1. use super::*;
  2. const CONFIG_DIR: &str = "./test";
  3. #[test]
  4. fn it_works() {
  5. assert_eq!(2 + 2, 4);
  6. }
  7. #[test]
  8. fn lib_test_init() {
  9. assert_eq!(init(CONFIG_DIR), true);
  10. }
  11. #[test]
  12. fn pkg_test_install() {
  13. assert_eq!(init(CONFIG_DIR), true);
  14. assert_eq!(install("test"), true);
  15. }
  16. #[test]
  17. fn pkg_test_update_all() {
  18. assert_eq!(init(CONFIG_DIR), true);
  19. assert_eq!(update_all(), true);
  20. }
  21. #[test]
  22. fn pkg_test_update() {
  23. assert_eq!(init(CONFIG_DIR), true);
  24. assert_eq!(update("test"), true);
  25. }
  26. #[test]
  27. fn pkg_test_resolve_dependencies() {
  28. assert_eq!(init(CONFIG_DIR), true);
  29. assert_ne!(resolve_dependencies("test").len(), 0);
  30. }
  31. #[test]
  32. fn pkg_test_remove() {
  33. assert_eq!(init(CONFIG_DIR), true);
  34. assert_eq!(remove("test"), true);
  35. }
  36. #[test]
  37. fn pkg_test_list() {
  38. assert_eq!(init(CONFIG_DIR), true);
  39. assert_ne!(list_packages().len(), 0);
  40. }
  41. #[test]
  42. fn server_test_add() {
  43. assert_eq!(init(CONFIG_DIR), true);
  44. assert_eq!(add_server("http://test.org"), true);
  45. }
  46. #[test]
  47. fn server_test_remove() {
  48. assert_eq!(init(CONFIG_DIR), true);
  49. assert_eq!(remove_server("http://test.org"), true);
  50. }
  51. #[test]
  52. fn server_test_list() {
  53. assert_eq!(init(CONFIG_DIR), true);
  54. assert_ne!(list_servers().len(), 0);
  55. }