All pastes #215047 Raw Edit

Something

public lua v1 · immutable
#215047 ·published 2006-10-22 10:43 UTC
rendered paste body
mtn_setup()-- check output if there are no changescheck(mtn("automate", "content_diff"), 0, true, true)check(fsize("stdout") == 0 and fsize("stderr") == 0)-- check non-existing pathcheck(mtn("automate", "content_diff", "non_existing"), 1, true, true)-- check existing path against current workspaceaddfile("existing", "foo bar")check(mtn("diff", "existing"), 0, true, true)--check(mtn("automate", "content_diff", "existing"), 0, true, true)check(fsize("stdout") ~= 0)-- add three more revisions and test for correct revid handlingcommit()R1=base_revision()writefile("existing", "foo foo")commit()R2=base_revision()writefile("existing", "foo foo bar")commit()R3=base_revision()-- two revisions should workcheck(mtn("automate", "content_diff", R1, R2), 0, true, true)check(fsize("stdout") ~= 0)-- three do notcheck(mtn("automate", "content_diff", R1, R2, R3), 1, true, true)