# Shell library for tbdiff yarns. # # The shell functions in this library are meant to make writing IMPLEMENTS # sections for yarn scenario tests easier. # Currently, yarn isn't setting $SRCDIR to point at the project source # directory. We simulate this here. { set +u if [ -z "$SRCDIR" ]; then export SRCDIR="$(pwd)" fi } # Test that the extended attributes of two files are the same by comparing the # output of `getfattr -d` on each file, which has been piped to `tail -n +2` in # order to skip the first line of output, being the file name. compare_xattrs() { test \ "$(getfattr -d "$1" | tail -n +2)" = "$(getfattr -d "$2" | tail -n +2)" }