Correct documentation example and add a corresponding test.
[pspp] / tests / language / stats / reliability.at
index dcae7d517ad5e44e367e70f01a425e293327d846..28fadab8df892761e495e21a4b30d5d7c78c8e99 100644 (file)
@@ -297,3 +297,35 @@ reliability variables=f01 to f10.
 AT_CHECK([pspp -O format=csv reliability.sps], [0], [])
 AT_CLEANUP
 
+
+
+
+dnl This is an example from doc/tutorial.texi
+dnl So if the results of this have to be changed in any way,
+dnl make sure to update that file.
+AT_SETUP([RELIABILITY tutorial example])
+AT_DATA([tut-example.sps], [dnl
+get file='hotel.sav'.
+
+compute v3 = 6 - v3.
+compute v5 = 6 - v5.
+
+reliability variables = v1 v3 v4.
+])
+
+AT_CHECK([ln -s $top_srcdir/examples/hotel.sav .], [0])
+AT_CHECK([pspp -O format=csv tut-example.sps], [0], [dnl 
+Scale: ANY
+
+Table: Case Processing Summary
+,,N,%
+Cases,Valid,17,100.00
+,Excluded,0,.00
+,Total,17,100.00
+
+Table: Reliability Statistics
+Cronbach's Alpha,N of Items
+.81,3
+])
+
+AT_CLEANUP