aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMarc Coquand <marc@mccd.space>2023-12-26 09:50:20 -0600
committerMarc Coquand <marc@mccd.space>2023-12-26 09:57:20 -0600
commit9cd7fbf7658793a443ad3a3b03cee4bbace0a0d4 (patch)
tree7313831ba6ca4f1a141a9f3750bf9f72d0c36365 /test
parent742c23d7c5d90b681dcbce92846d57042d2ea467 (diff)
downloadfixgen-9cd7fbf7658793a443ad3a3b03cee4bbace0a0d4.tar.gz
fixgen-9cd7fbf7658793a443ad3a3b03cee4bbace0a0d4.tar.bz2
fixgen-9cd7fbf7658793a443ad3a3b03cee4bbace0a0d4.zip
Support setting amount to be generated
Diffstat (limited to '')
-rw-r--r--test/test_parser.ml18
1 files changed, 10 insertions, 8 deletions
diff --git a/test/test_parser.ml b/test/test_parser.ml
index 941ac56..5a56e6a 100644
--- a/test/test_parser.ml
+++ b/test/test_parser.ml
@@ -13,26 +13,28 @@ let test_parse s () =
let rows_suite =
- [ "Can parse uuidv4", `Quick, test_parse "user: id _uuidv4"
+ [ "Can parse uuidv4", `Quick, test_parse "user (1): id _uuidv4"
; ( "Can parse multiple tables"
, `Quick
- , test_parse "user: id _uuidv4\npurchases: id _uuidv4" )
- ; "Resolves conflicting names", `Quick, test_parse "purchases: name _uuidv4"
- ; "Supports names", `Quick, test_parse "purchases: name _name"
- ; "Supports ints with min/max", `Quick, test_parse "purchases: name _int<1,20>"
+ , test_parse "user (1): id _uuidv4\npurchases (1): id _uuidv4" )
+ ; "Supports names", `Quick, test_parse "purchases (1): name _name"
+ ; "Supports ints with min/max", `Quick, test_parse "purchases (1): name _int(1,20)"
+ ; ( "Supports setting amount of fixture to generate"
+ , `Quick
+ , test_parse "purchases (5): name _int(1,20)" )
]
let relations_suite =
[ ( "Can reference other tables"
, `Quick
- , test_parse "user: id _uuidv4\npurchases: id _uuidv4, userid user.id" )
+ , test_parse "user (2): id _uuidv4\npurchases (3): id _uuidv4, userid user.id" )
; ( "Can use ; as a separator"
, `Quick
- , test_parse "user: id _uuidv4; purchases: id _uuidv4" )
+ , test_parse "user (2): id _uuidv4; purchases (5): id _uuidv4" )
; ( "Supports multiple newlines"
, `Quick
- , test_parse "user: id _uuidv4\n\n\n\n\npurchases: id _uuidv4" )
+ , test_parse "user (2): id _uuidv4\n\n\n\n\npurchases (5): id _uuidv4" )
]