25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
504B

  1. from cfg import *
  2. from ht_Context import *
  3. def test_cfg_parseConfigTree(
  4. ) -> str:
  5. c = ht_createContext()
  6. c.cfgContents = [
  7. "[abc]",
  8. "width = 100",
  9. "wrongSep=another",
  10. "[def]",
  11. "anotherWrongSep -> whatever",
  12. "title = yo",
  13. "subtitle = whoa",
  14. ]
  15. c.recentField = "cfgContents"
  16. c = cfg_parseConfigTree(c)
  17. if (
  18. cld_len(c.cfgTree) == 2
  19. ):
  20. return "OK: cfg_parseConfigTree"
  21. return "ERR: cfg_parseConfigTree"