diff --git a/datapacks/Bookshelf Dev/data/bs.dump/tests/var.mcfunction b/datapacks/Bookshelf Dev/data/bs.dump/tests/var.mcfunction new file mode 100644 index 0000000000..5ce0b0a6a6 --- /dev/null +++ b/datapacks/Bookshelf Dev/data/bs.dump/tests/var.mcfunction @@ -0,0 +1,13 @@ +# Dumping var works as expected +# @batch bs.dump +# @dummy + +data modify storage bs:data packtest set value {foo:"bar"} +function #bs.dump:var { var: { storage: "storage bs:data packtest", entity:"entity @s {} 0", score: ["3 bs.const", "-_- bs.const"] }} + +assert chat '.*?\\{[\\s\\S]*storage: \\{[\\s\\S]*foo: \\"bar\\"[\\s\\S]*\\}[\\s\\S]*\\}' +assert chat '.*?\\{[\\s\\S]*entity: \\{ [0-9]+ entries .*? \\}[\\s\\S]*\\}' +assert chat '.*?\\{[\\s\\S]*score: \\[3, undefined\\][\\s\\S]*\\}' + +data remove storage bs:data packtest +