#!./libs/bats-core/bin/bats load 'libs/setup' @test "deleted middle" { $OJO init cat > ojo_file.txt < ojo_file.txt < ojo_file.txt < ojo_file.txt < ojo_file.txt < ojo_file.txt HASH=`$OJO patch create -a Author -m Msg --output-hash` $OJO patch apply "$HASH" truncate --size 0 ojo_file.txt HASH=`$OJO patch create -a Author -m Msg --output-hash` $OJO patch apply "$HASH" $OJO patch apply -R "$HASH" $OJO patch apply "$HASH" } @test "replacement" { $OJO init echo "Test" > ojo_file.txt HASH=`$OJO patch create -a Author -m Msg --output-hash` $OJO patch apply "$HASH" echo "Alt" > ojo_file.txt HASH=`$OJO patch create -a Author -m Msg --output-hash` $OJO patch apply "$HASH" $OJO patch apply -R "$HASH" $OJO patch apply "$HASH" }