--- /dev/null
+#!/bin/sh
+#
+# Attempt to backup and restore a file with the delta plugin
+#
+
+TestName="delta-test"
+JobName=pluginTest
+. scripts/functions
+
+scripts/cleanup
+scripts/copy-plugin-confs
+
+cat << EOF >> $conf/bacula-dir.conf
+FileSet {
+ Name = "FS_DELTA"
+ Include {
+ Options {
+ signature=MD5
+ }
+ Plugin = "delta-test"
+ }
+}
+EOF
+
+$bperl -e 'add_attribute("$conf/bacula-dir.conf", "FileSet", "FS_DELTA", "Job", "pluginTest")'
+
+
+start_test
+
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
+@$out /dev/null
+messages
+@$out ${cwd}/tmp/log1.out
+label storage=File volume=TestVolume001
+setdebug level=150 client=$CLIENT
+estimate job=$JobName level=Full
+setdebug level=50 client=$CLIENT
+run job=$JobName yes
+wait
+status client=$CLIENT
+messages
+run job=$JobName level=Incremental yes
+wait
+status client=$CLIENT
+run job=$JobName level=Incremental yes
+wait
+status client=$CLIENT
+quit
+END_OF_DATA
+
+run_bacula
+
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
+messages
+@#
+@# now do a restore
+@#
+@$out ${cwd}/tmp/log2.out
+setdebug level=50 client=$CLIENT
+restore select all done
+yes
+wait
+messages
+@$out ${cwd}/tmp/log3.out
+status client
+setdebug level=0 client=$CLIENT
+quit
+END_OF_DATA
+
+run_bconsole
+
+check_two_logs
+
+stop_bacula
+
+end_test