--- /dev/null
+dnl PSPP - a program for statistical analysis.
+dnl Copyright (C) 2017 Free Software Foundation, Inc.
+dnl
+dnl This program is free software: you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation, either version 3 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
+dnl
+AT_BANNER([MDD files])
+
+AT_SETUP([write MDD file])
+AT_KEYWORDS([SAVE GET system file])
+AT_DATA([test.sps], [dnl
+DATA LIST LIST NOTABLE / variable001 * variable002 * variable003 * variable004 * .
+BEGIN DATA.
+ 1.00 1.00 1.0 2.00
+ 1.00 1.00 2.0 30.00
+ 1.00 2.00 1.0 8.00
+ 1.00 2.00 2.0 20.00
+ 2.00 1.00 1.0 2.00
+ 2.00 1.00 2.0 22.00
+ 2.00 2.00 1.0 1.00
+ 2.00 2.00 2.0 3.00
+END DATA.
+
+SAVE DATA COLLECTION /OUTFILE='test.sav' /METADATA='test.mdd'.
+])
+AT_CHECK([pspp -o pspp.csv test.sps])
+AT_CHECK([test -e test.sav])
+AT_CHECK([test -e test.mdd])
+
+if test $HAVE_XMLLINT = yes; then
+ AT_CHECK([$XMLLINT --format test.mdd], [0], [ignore])
+fi
+AT_CLEANUP