File: test_0210_cp_basic.sh

package info (click to toggle)
libsmb2 6.2%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,992 kB
  • sloc: ansic: 33,026; sh: 221; makefile: 189; cpp: 98
file content (25 lines) | stat: -rwxr-xr-x 611 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh

. ./functions.sh

echo "basic cp read/write test"

echo -n "Testing cp to root of share ... "
rm testfile2 2>/dev/null
echo "HappyPenguins!" > testfile
../utils/smb2-cp testfile "${TESTURL}/testfile" > /dev/null || failure
success

echo -n "Testing cp from root of share ... "
../utils/smb2-cp "${TESTURL}/testfile"  testfile2 > /dev/null || failure
success

echo -n "Verify file content match ... "
cmp testfile testfile2 || failure
success

echo -n "Testing cp from a file that does not exist ... "
../utils/smb2-cp "${TESTURL}/testfile-not-exist"  testfile2 2>/dev/null && failure
success

exit 0