File: simple_integ_test.sh

package info (click to toggle)
python-xattr 0.9.6-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 208 kB
  • sloc: python: 693; ansic: 489; sh: 32; makefile: 15
file content (14 lines) | stat: -rwxr-xr-x 375 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash
set -eu
echo "Expect 'OK' on success"
fn=/tmp/xattr.test
rm -f $fn
touch $fn
[[ $(xattr -p user.foo $fn 2>&1 ) == "No such xattr: user.foo" ]]
xattr -w user.foo bar $fn
[[ $(xattr -p user.foo $fn) == "bar" ]]
[[ $(xattr $fn) == "user.foo" ]]
xattr -d user.foo $fn
[[ $(xattr $fn) == "" ]]
[[ $(xattr -p user.foo $fn 2>&1 ) == "No such xattr: user.foo" ]]
echo OK