sack works
[pspp] / tests / data / sys-file-reader.at
index 4057109e1b203eb813b0d8f39b8c6e671fd02a26..beb35adae9f90ae6704ea8aec25e5cfb0abf28e1 100644 (file)
@@ -16,6 +16,16 @@ dnl along with this program.  If not, see <http://www.gnu.org/licenses/>.
 dnl
 AT_BANNER([system file reader - positive])
 
+m4_divert_text([PREPARE_TESTS], [dnl
+sack () {
+    local endian=$1 file=$2 dir=$(pwd)
+    $(which sack) "$1" "$2" > expected.sav || return 1
+    (cd $top_srcdir/rust && cargo test --test sack -- "$endian" "$dir/$file" "$dir/actual.sav" >/dev/null 2>&1) || return 1
+    diff -u <(hd expected.sav) <(hd actual.sav) || return 1
+    cat expected.sav
+}
+])
+
 AT_SETUP([variable labels and missing values])
 AT_KEYWORDS([sack synthetic system file positive])
 AT_DATA([sys-file.sack], [dnl