summaryrefslogtreecommitdiff
path: root/source4/script
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-05-24 22:15:03 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:08:35 -0500
commitae67b20623b1887b2afa061f328b5d52654ba6c7 (patch)
tree8dfcbb9f20edea94fa4b988253a8d99db819035f /source4/script
parente157dccfaf699bc6fe436a8cdf1c95b125cde2db (diff)
downloadsamba-ae67b20623b1887b2afa061f328b5d52654ba6c7.tar.gz
samba-ae67b20623b1887b2afa061f328b5d52654ba6c7.tar.bz2
samba-ae67b20623b1887b2afa061f328b5d52654ba6c7.zip
r15875: Fix bug in smbclients 'put' command tridge found a while ago. Add tests
for 'put' and 'get' commands so we don't break them again. Fixes #3742 (This used to be commit 141600a624ca90374c2f306139015f8c7487cc0f)
Diffstat (limited to 'source4/script')
-rwxr-xr-xsource4/script/tests/test_smbclient.sh24
1 files changed, 21 insertions, 3 deletions
diff --git a/source4/script/tests/test_smbclient.sh b/source4/script/tests/test_smbclient.sh
index 47c9c14a66..b2d57135f7 100755
--- a/source4/script/tests/test_smbclient.sh
+++ b/source4/script/tests/test_smbclient.sh
@@ -32,14 +32,14 @@ EOF
# put that file
-echo mput tmpfile | runcmd "Putting file" || failed=`expr $failed + 1`
+echo mput tmpfile | runcmd "MPutting file" || failed=`expr $failed + 1`
# check file info
echo altname tmpfile | runcmd "Getting alternative name" || failed=`expr $failed + 1`
# run allinfo on that file
echo allinfo tmpfile | runcmd "Checking info on file" || failed=`expr $failed + 1`
# get that file
mv tmpfile tmpfile-old
-echo mget tmpfile | runcmd "Getting file" || failed=`expr $failed + 1`
+echo mget tmpfile | runcmd "MGetting file" || failed=`expr $failed + 1`
# remove that file
echo rm tmpfile | runcmd "Removing file" || failed=`expr $failed + 1`
# compare locally
@@ -61,6 +61,24 @@ echo rmdir bla | runcmd "Removing directory" || failed=`expr $failed + 1`
# run fsinfo
echo fsinfo objectid | runcmd "Getting file system info" || failed=`expr $failed + 1`
-rm -f tmpfile tmpfile-old
+# put that file
+echo put tmpfile | runcmd "Putting file" || failed=`expr $failed + 1`
+# get that file
+mv tmpfile tmpfile-old
+echo get tmpfile | runcmd "Getting file" || failed=`expr $failed + 1`
+# remove that file
+echo rm tmpfile | runcmd "Removing file" || failed=`expr $failed + 1`
+# compare locally
+testit "Comparing files" diff tmpfile-old tmpfile || failed=`expr $failed + 1`
+# put that file
+echo put tmpfile tmpfilex | runcmd "Putting file with different name" || failed=`expr $failed + 1`
+# get that file
+echo get tmpfilex | runcmd "Getting file again" || failed=`expr $failed + 1`
+# compare locally
+testit "Comparing files" diff tmpfilex tmpfile || failed=`expr $failed + 1`
+# remove that file
+echo rm tmpfilex | runcmd "Removing file" || failed=`expr $failed + 1`
+
+rm -f tmpfile tmpfile-old tmpfilex
testok $0 $failed