Rewrite PSPP output engine.
[pspp-builds.git] / tests / expressions / valuelabel.sh
index 1c29a7a523f2a4ee42e4b3f5dc2f030d19f83c63..1b5b92e2ac56cb264fc71ae14b2faa7a39661a10 100755 (executable)
@@ -60,6 +60,7 @@ cat > $TEMPDIR/valuelabel.stat <<EOF
 DATA LIST notable /n 1 s 2(a).
 VALUE LABELS /n 0 'Very dissatisfied'
                 1 'Dissatisfied'
+               1.5 'Slightly Peeved'
                 2 'Neutral'
                 3 'Satisfied'
                 4 'Very satisfied'.
@@ -82,6 +83,7 @@ BEGIN DATA.
 5f
 6g
 END DATA.
+
 EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
@@ -90,18 +92,17 @@ $SUPERVISOR $PSPP --testing-mode $TEMPDIR/valuelabel.stat
 if [ $? -ne 0 ] ; then fail ; fi
 
 activity="compare results"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  $TEMPDIR/pspp.list - <<EOF
-n s     nlabel     slabel
-- - ---------- ----------
-.                         
-0 a Very dissa Wouldn't b 
-1 b Dissatisfi Unhappy    
-2 c Neutral    Bored      
-3 d Satisfied  Satiated   
-4 e Very satis Elated     
-5 f                       
-6 g                       
+diff -c $TEMPDIR/pspp.csv - <<EOF
+Table: Data List
+n,s,nlabel,slabel
+.,,,
+0,a,Very dissa,Wouldn't b
+1,b,Dissatisfi,Unhappy   
+2,c,Neutral   ,Bored     
+3,d,Satisfied ,Satiated  
+4,e,Very satis,Elated    
+5,f,,
+6,g,,
 EOF
 if [ $? -ne 0 ] ; then fail ; fi