testdata_test.go 870 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. package tomllint
  2. var synataxerrordata = `
  3. [owner]
  4. name = "Tom Preston-Werner"
  5. dob 1979-05-27T07:32:00-08:00 # First class dates
  6. `
  7. var normaldata = `
  8. [owner]
  9. name = "Tom Preston-Werner"
  10. dob = 1979-05-27T07:32:00-08:00 # First class dates
  11. [database]
  12. server = "192.168.1.1"
  13. ports = [ 8001, 8001, 8002 ]
  14. connection_max = 5000
  15. enabled = true
  16. [servers]
  17. # Indentation (tabs and/or spaces) is allowed but not required
  18. [servers.alpha]
  19. ip = "10.0.0.1"
  20. dc = "eqdc10"
  21. [servers.beta]
  22. ip = "10.0.0.2"
  23. dc = "eqdc10"
  24. [clients]
  25. data = [ ["gamma", "delta"], [1, 2] ]
  26. # Line breaks are OK when inside arrays
  27. hosts = [
  28. "alpha",
  29. "omega"
  30. ]
  31. `
  32. var notopkvdata = `
  33. title = "test123"
  34. age = 123
  35. array = [1,2,3]
  36. [clients]
  37. data = "helo"
  38. `
  39. var nocommondata = `
  40. version = "v1.1"
  41. user = "nobody"
  42. `
  43. var noidentify = `
  44. [identify]
  45. xxx = 123
  46. `
  47. var noapp = `
  48. [app]
  49. xxx = 123
  50. `