File: simple_integ_test.sh

package info (click to toggle)
python-xattr 0.10.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 204 kB
  • sloc: python: 824; ansic: 489; sh: 32; makefile: 17
file content (14 lines) | stat: -rwxr-xr-x 375 bytes parent folder | download | duplicates (3)
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