packtest icon indicating copy to clipboard operation
packtest copied to clipboard

Errors aren't correctly ordered

Open edayot opened this issue 1 year ago • 2 comments

When executed tests report the last fail command and not the first one, for example :

setblock ~ ~5 ~ stone

await delay 2s

execute if block ~ ~5 ~ stone run fail "This should fail"
execute if block ~ ~5 ~ stone run fail "But this do fail instead"

Produce this output: test

Datapack : test_dp.zip

edayot avatar Nov 08 '24 17:11 edayot

The problem is not one of order. The issue is that the function does not terminate when fail is executed.

fail "This is a fail!"
say I should not run!

grafik

UncleThaodan avatar Dec 14 '24 14:12 UncleThaodan

Actually, fail, assert, succeed and even return all fail to end the test early.

UncleThaodan avatar Dec 17 '24 21:12 UncleThaodan