From 740c7ba6927d8dacf37903b0b151bfdb8c608cba Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sun, 17 Apr 2005 23:43:12 +0000 Subject: [PATCH] Removed unused/obsolete/bad tests. --- tests/ChangeLog | 12 +++ tests/Makefile.am | 9 +-- tests/crosstabs.stat | 19 ----- tests/data-fmts.stat | 179 ------------------------------------------- tests/do-if.stat | 24 ------ tests/do-repeat.stat | 17 ---- tests/gengarbage.c | 41 ---------- tests/inpt-pgm.stat | 26 ------- tests/mdfy-vars.stat | 31 -------- tests/means.stat | 14 ---- tests/mtch-file.stat | 55 ------------- tests/pcs-if.stat | 21 ----- tests/recode.stat | 21 ----- tests/repeating.stat | 16 ---- tests/reread.data | 5 -- tests/reread.stat | 16 ---- tests/sys-info.stat | 13 ---- tests/t-test.stat | 13 ---- tests/temporary.stat | 29 ------- tests/time-date.stat | 77 ------------------- tests/vector.stat | 24 ------ 21 files changed, 13 insertions(+), 649 deletions(-) delete mode 100644 tests/crosstabs.stat delete mode 100644 tests/data-fmts.stat delete mode 100644 tests/do-if.stat delete mode 100644 tests/do-repeat.stat delete mode 100644 tests/gengarbage.c delete mode 100644 tests/inpt-pgm.stat delete mode 100644 tests/mdfy-vars.stat delete mode 100644 tests/means.stat delete mode 100644 tests/mtch-file.stat delete mode 100644 tests/pcs-if.stat delete mode 100644 tests/recode.stat delete mode 100644 tests/repeating.stat delete mode 100644 tests/reread.data delete mode 100644 tests/reread.stat delete mode 100644 tests/sys-info.stat delete mode 100644 tests/t-test.stat delete mode 100644 tests/temporary.stat delete mode 100644 tests/time-date.stat delete mode 100644 tests/vector.stat diff --git a/tests/ChangeLog b/tests/ChangeLog index 4d294bdf..ed4a3a09 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,15 @@ +Sun Apr 17 16:38:00 2005 Ben Pfaff + + * crosstabs.stat, data-fmts.stat, do-if.stat, do-repeat.stat, + gengarbage.c, inpt-pgm.stat, mdfy-vars.stat, means.stat, + mtch-file.stat, pcs-if.stat, recode.stat, repeating.stat, + reread.data, reread.stat, sys-info.stat, t-test.stat, + temporary.stat, time-date.stat, vector.stat: Removed because they + were unused. + + * Makefile.am: Removed sort.data references. Fixed up + DISTCLEANFILES. + Sun Mar 20 14:16:31 2005 Ben Pfaff * command/aggregate.sh: Rewrite. diff --git a/tests/Makefile.am b/tests/Makefile.am index 2b2196c0..2717d67a 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -91,12 +91,6 @@ TESTS = \ expressions/variables.sh \ expressions/vectors.sh -noinst_PROGRAMS = gengarbage - -noinst_DATA = sort.data -sort.data: gengarbage$(EXTEXT) - ./gengarbage | head -1000 > $@ - EXTRA_DIST = $(TESTS) weighting.data data-list.data list.data \ bugs/computebug.stat bugs/computebug.out \ bugs/recode-copy-bug-1.stat bugs/recode-copy-bug-2.stat \ @@ -118,7 +112,6 @@ EXTRA_DIST = $(TESTS) weighting.data data-list.data list.data \ expressions/randist/uniform.out \ expressions/randist/weibull.out -DISTCLEANFILES = *.save sort.data pspp.* foo* msgs *.actual +DISTCLEANFILES = *.save pspp.* foo* MAINTAINERCLEANFILES = Makefile.in - diff --git a/tests/crosstabs.stat b/tests/crosstabs.stat deleted file mode 100644 index e201d260..00000000 --- a/tests/crosstabs.stat +++ /dev/null @@ -1,19 +0,0 @@ -clear transformations. -input program. -loop a=1 to 1000. -compute a=trunc(uniform(5)). -compute b=trunc(uniform(5)). -compute c=trunc(uniform(5)). -compute d=trunc(uniform(5)). -compute e=trunc(uniform(5)). -compute f=trunc(uniform(5)). -end case. -end loop. -end file. -end input program. -select if not ((a=1 and e=3) or (c=2)). -print /all. -missing value all (2). -*crosstabs/missing=report/variables=a to f(0,4)/tables=a by e by f/statistics=all/pivot on. -crosstabs a by e by f/statistics=all/pivot on. -execute. diff --git a/tests/data-fmts.stat b/tests/data-fmts.stat deleted file mode 100644 index 87b86bb2..00000000 --- a/tests/data-fmts.stat +++ /dev/null @@ -1,179 +0,0 @@ -set echo off. -title 'Test non-binary data input formats'. - -data list /a 1-8(a) /* 1 - ahex 9-16(ahex) /* 2 - comma 17-24(comma) /* 3 - dollar 25-32(dollar) /* 4 - f 33-40(f) /* 5 - pibhex 41-48(pibhex) /* 6 - n 49-56(n) /* 7 - e 57-64(e). /* 8 -formats comma(comma8.2) dollar(dollar8.2). -print /a ahex comma dollar f pibhex n e. - -/* This set of data should produce errors: -/* -/* - First line should be error-free. -/* - Second line should have errors for F, PIBHEX, and N fields. -/* - Third line should have errors for COMMA, DOLLAR, F, and N fields. -/* - Fourth line should have errors for F and N fields. -/* -/* 2 3 4 5 6 7 8 . -begin data. -abcdefgh414243441,2,3.4,$1,2,3.4123456.6100023451234567812345678 - 4a4b4c4d1,234.56$1234.56 abcd ghjk -12345671234+56 - 4C4D4E4F1234+56 $1234+56 0 1 abcd 12345e671234e+56 - 555657581234e+561234e+56 1.2 3 000000001234e67 1234-5 -end data. - -data list /date 1-32(date) /* 1 - time 33-64(time,4). /* 2 -print /date time. - -/* This set of data should produce errors: -/* -/* 2 -begin data. -11-july-1982 12:10:55.59 -8-xii-23 55:56:75.105 -end data. - -data list /datetime 1-32(datetime,4) /* 1 - adate 33-64(adate). /* 2 -print /datetime adate. -/* 2 -begin data. -7-7-8 12:10:55.5 10/15/1582 -11-jul-1982 9:00 10/01/78 -end data. - -data list /jdate 1-32(jdate) /* 1 - dtime 33-64(dtime). /* 2 -print /jdate dtime. -/* 2 -begin data. -1582365 10 15:30:00.32 -1996001 0 8:23:59.99 -end data. - -data list /wkday 1-32(wkday) /* 1 - month 33-64(month). /* 2 -print /wkday month. -/* 2 -begin data. -mon xii -Saturday 12 -thursday march - ixiii -end data. - -data list /moyr 1-32(moyr) /* 1 - qyr 33-64(qyr). /* 2 -print /moyr qyr. -/* 2 -begin data. -jan 96 4 q 1986 -mar 1896 1q1600 -end data. - -data list /wkyr 1-32(wkyr) /* 1 - pct 33-64(pct). /* 2 -print /wkyr pct. -/* 2 -begin data. -4 wk 97 105% -52 wk 1996 55.5% -end data. - -data list /dot 1-32(dot) /* 1 - edate 33-64(edate). /* 2 -formats dot(dot32.3). -print /dot edate. -/* 2 -begin data. -123.456.789,348 1.10.1978 - 30.12.1996 -end data. - -formats dot (comma32.3). -set decimal comma. -print /dot. -execute. - -set decimal dot. -print /dot. -execute. - -data list /sdate 1-32(sdate). /* 1 -print /sdate. -begin data. -1923/7/3 -1992.5.2 -end data. - -data list /date 1-32. -compute date = date * 86400. -print /date (date32). -begin data. -1 -50000 -102 -1157 -14288 -87365 -109623 -153211 -152371 -144623 -end data. - -data list /date 1-32(date). -compute jdate = date / 86400. -print /jdate. -begin data. -15-OCT-1582 -06-SEP-1719 -24-JAN-1583 -14-DEC-1585 -26-NOV-1621 -25-DEC-1821 -03-DEC-1882 -06-APR-2002 -18-DEC-1999 -01-OCT-1978 -end data. - -set cca 'NPX,PFX,SFX,NSX'. -set ccb 'NPX.PFX.SFX.NSX'. -set ccc '-,$,,'. -set ccd '(.SFR..)'. -set cce 'asld,adl,lfj,lfs'. - -data list /cc 1-32(f). -print /'cca: ' cc (cca32.2). -print /'ccb: ' cc (ccb32.2). -print /'ccc: ' cc (ccc32.2). -print /'ccd: ' cc (ccd32.2). -print /'cce: ' cc (cce32.2). -begin data. -78.19 --78.19 -123456789.12 -1e23 -end data. - -print /'cca: ' cc (cca16.2). -print /'ccb: ' cc (ccb16.2). -print /'ccc: ' cc (ccc16.2). -print /'ccd: ' cc (ccd16.2). -print /'cce: ' cc (cce16.2). -execute. - -print /'cca: ' cc (cca8.2). -print /'ccb: ' cc (ccb8.2). -print /'ccc: ' cc (ccc8.2). -print /'ccd: ' cc (ccd8.2). -print /'cce: ' cc (cce8.2). -execute. - diff --git a/tests/do-if.stat b/tests/do-if.stat deleted file mode 100644 index 8f1816e5..00000000 --- a/tests/do-if.stat +++ /dev/null @@ -1,24 +0,0 @@ -title 'Test DO IF control structure'. - -data list /x y z 1-6. -begin data. -000099 -019900 -019820 -001089 -020000 -end data. -do if x~=2. -loop i=1 to x. -do if x=0. -print /i x z. -else. -do if x=1. -print /i x y. -else. -print /i 'Huh?'. -end if. -end if. -end loop. -end if. -execute. diff --git a/tests/do-repeat.stat b/tests/do-repeat.stat deleted file mode 100644 index c26951f5..00000000 --- a/tests/do-repeat.stat +++ /dev/null @@ -1,17 +0,0 @@ -title 'Test DO REPEAT control structure'. - -set echo on. -data list file='list.data'/var00001 to var00005 1-5. -string s1 to s5(a8). -vector s=s1 to s5. -do repeat v=var1 to var5/r=region1 to region5/x=0 to 4 - /y=10 to 6/z='abcd',x'010203','alksdj'+'fklasdjfladsf','al''ksj','iouio' - /longname=var00001 to var00005. -compute v=2**x. -compute v=x. -compute r=v. -compute longname=r. -compute s(x+1)=z. -end repeat print. -list. - diff --git a/tests/gengarbage.c b/tests/gengarbage.c deleted file mode 100644 index f079e911..00000000 --- a/tests/gengarbage.c +++ /dev/null @@ -1,41 +0,0 @@ -/* gengarbage - Generates 127-character lines of random digits. - Copyright (C) 1997, 1998 Free Software Foundation, Inc. - Written by Ben Pfaff . - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ - -#include -#include -#include - -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif - -int -main (void) -{ - srand (time (0)); - for (;;) - { - int c; - - for (c = 0; c < 127; c++) - putchar ('0' + rand() % 10); - putchar ('\n'); - } - exit (EXIT_SUCCESS); -} diff --git a/tests/inpt-pgm.stat b/tests/inpt-pgm.stat deleted file mode 100644 index 69e934c6..00000000 --- a/tests/inpt-pgm.stat +++ /dev/null @@ -1,26 +0,0 @@ -/* -/* -/* Tests for INPUT PROGRAM. -/* -/* - -remark EOF ----------------------------------------------------------------------- -Testing use of INPUT PROGRAM. ----------------------------------------------------------------------- -EOF -input program. -data list free/A #B. -end case. -data list free/C D. -end case. -data list fixed/#E 2. -end case. -end input program. -list. - -begin data. -1 2 3 4 5 -6 7 8 9 0 -end data. - diff --git a/tests/mdfy-vars.stat b/tests/mdfy-vars.stat deleted file mode 100644 index d53cddb0..00000000 --- a/tests/mdfy-vars.stat +++ /dev/null @@ -1,31 +0,0 @@ -title 'Test MODIFY VARS, RENAME VARIABLES'. - -/* Note that these are not quite in alphabetic order. -data list /a b c d e f g h i j k m n o p l q r s t u v w x y z 1-26 (a). - -/* Dummy data that's not actually examined. -begin data. -ABCDEFGHIJKLMNOPQRSTUVWXYZ -NOPQRSTUVWXYZABCDEFGHIJKLM -end data. - -/* This should display z y x w s q p n m l k j i h t7 t6 t5 t4 t3 t2 t1. -modify vars /reorder=backward alpha/drop o r t u v/rename (a to g=t1 to t7). -display var. - -/* This should display z y x w s q p n m l x14 x13 x12 x11 t1 t6 t5 t4 t3 -/* t2 t7. -rename variables (t1=t7)(t7=t1)(h i j k=x11 to x14). -display var. - -/* The command below should fail with an error message. -rename variables (t1=t2)(t2=t2). - -/* This should display y x w s q p n m l x14 x13 x12 x11 t1 t6 t5 t3 t7. -modify vars /reorder=forward positional/keep y to t5 t3 x14 t7. -display var. - -/* This should display t7 x11 q s x y. */ -modify vars /reorder=backward positional/keep x s y x11 t7 q. -display var. - diff --git a/tests/means.stat b/tests/means.stat deleted file mode 100644 index dbc00dfd..00000000 --- a/tests/means.stat +++ /dev/null @@ -1,14 +0,0 @@ -title 'Preliminary test for MEANS procedure'. - -data list /v1 to v4 1-4. -begin data. -1234 -321 -2 13 -4121 -1104 -03 4 -0193 -end data. -means variables=v1(1,4) v2(1,9) v3(lo,hi) - /tables=v1 by v2 by v3. diff --git a/tests/mtch-file.stat b/tests/mtch-file.stat deleted file mode 100644 index ba6a033a..00000000 --- a/tests/mtch-file.stat +++ /dev/null @@ -1,55 +0,0 @@ -title 'Test MATCH FILES'. -data list /x a b c 1-4. -begin data. -0243 -1983 -2924 -2853 -3195 -4862 -2056 -end data. -save 'mtf-1.save'. - -data list /x d e f 1-4. -begin data. -0837 -1834 -2843 -2049 -3853 -5029 -2853 -end data. -save 'mtf-2.save'. - -data list /x g h i 1-4. -begin data. -0743 -1823 -6845 -2875 -3945 -4341 -2723 -end data. - -match files /file='mtf-1.save' /file='mtf-2.save' /table=* /by x. -list. - -data list /x g h i 1-4. -begin data. -0743 -1823 -6845 -2875 -3945 -4341 -2723 -end data. - -match files /file='mtf-1.save' /file='mtf-2.save' /file=* /by x. -list. - -match files/file='mtf-1.save' /file='mtf-2.save'/by x. -list. diff --git a/tests/pcs-if.stat b/tests/pcs-if.stat deleted file mode 100644 index 29ee48c4..00000000 --- a/tests/pcs-if.stat +++ /dev/null @@ -1,21 +0,0 @@ -title 'Test PROCESS IF utility'. - -data list /x 1-2. -begin data. -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -end data. -process if mod(x,2) ~= 0. -list. -compute x = x*3. -process if mod(x,2) = 0. -list. - diff --git a/tests/recode.stat b/tests/recode.stat deleted file mode 100644 index 07a64f32..00000000 --- a/tests/recode.stat +++ /dev/null @@ -1,21 +0,0 @@ -title 'Test RECODE transformation'. - -data list /A B 1-20(a). -begin data. -12345678901234567890 -a b -jkl; aklsdf -aklsd ioqeur - ioquer pasdflk -end data. -*recode A B(1,2,3,4=5)(5 thru hi=9)(lo thru 10=4) into A D - /A B(lo thru hi=copy)(sysmis=0)(else=sysmis) into C D. -string c d(a10). -leave c d. -recode A B('a'='b')('jkl;'='jkl;p')('ioqeur'='sdjfkla') into C D. -*recode A B(1,2,3,4="asdf")(else="xyzw")(sysmis="bdfg") into C D. -*recode A B("asdf"=copy)(convert)("lkjf"=sysmis)(convert)(else=123) into C D. -*recode A B(1,3,5,6,7=COPY)(SYSMIS=5e5) into C D. -*recode a (convert)('xx'=50) into b. -list. - diff --git a/tests/repeating.stat b/tests/repeating.stat deleted file mode 100644 index fdfd330c..00000000 --- a/tests/repeating.stat +++ /dev/null @@ -1,16 +0,0 @@ -title 'Test REPEATING DATA utility'. - -input program. -data list /x 1 n 3. -repeating data starts=11-20 /continues=2-11 /length=10 /occurs=n - /id=1=x /data=name 1-5 (a) number 6-10. -end input program. - -begin data. -1 3 foo 1 -1bar 2 -1baz 3 -end data. - -list. - diff --git a/tests/reread.data b/tests/reread.data deleted file mode 100644 index caa7a044..00000000 --- a/tests/reread.data +++ /dev/null @@ -1,5 +0,0 @@ -5510ACME 5 - 5MISC 8901 -8974ACME 9 -1928ACME 4 - 6MISC 8973 diff --git a/tests/reread.stat b/tests/reread.stat deleted file mode 100644 index 694e61d4..00000000 --- a/tests/reread.stat +++ /dev/null @@ -1,16 +0,0 @@ -title 'Test REREAD transformation'. - -file handle INPUT /name='reread.data'. - -input program. - data list file=INPUT/BRAND 5-10(a). - do if(BRAND='ACME'). - reread. - data list /PART 1-4 COUNT 11-15. - else if(BRAND='MISC'). - reread. - data list /PART 11-15 COUNT 1-4. - end if. - end case. -end input program. -list. diff --git a/tests/sys-info.stat b/tests/sys-info.stat deleted file mode 100644 index 070e0d5e..00000000 --- a/tests/sys-info.stat +++ /dev/null @@ -1,13 +0,0 @@ -title 'Test SYSFILE INFO, DISPLAY utilities'. - -/* Run file-label.stat before running this syntax file, as it -/* creates foo.save. -sysfile info file='foo.save'. - -get 'foo.save'. -display names. -display index. -display labels. -display variables. -display dictionary. - diff --git a/tests/t-test.stat b/tests/t-test.stat deleted file mode 100644 index 3395a500..00000000 --- a/tests/t-test.stat +++ /dev/null @@ -1,13 +0,0 @@ -title 'Preliminary test for T-TEST procedure'. - -data list /v1 to v4 1-4. -begin data. -1234 -321 -2 13 -4121 -1104 -03 4 -0193 -end data. -t-test v1 v2 with v3 v4 (paired). diff --git a/tests/temporary.stat b/tests/temporary.stat deleted file mode 100644 index 08645a35..00000000 --- a/tests/temporary.stat +++ /dev/null @@ -1,29 +0,0 @@ -title 'Test TEMPORARY transformation'. - -set echo on/screen on. -data list /z 1 x 2. -formats x(f3). -split file by z. -list. -begin data. -12 -13 -14 -15 -16 -23 -24 -25 -26 -27 -28 -end data. -compute x=x+1. -temporary. -compute x=x+1. -compute y=x+1. -sel if y<7. -descriptives x y. -list. -compute x=x-10. -list. diff --git a/tests/time-date.stat b/tests/time-date.stat deleted file mode 100644 index f9a9c736..00000000 --- a/tests/time-date.stat +++ /dev/null @@ -1,77 +0,0 @@ -title 'Test time and date input and output formats'. - -data list fixed - /a(date20)/b(adate20)/c(jdate20)/d(qyr20)/e(moyr20)/f(wkyr20)/g(wkday20) - /h(month20)/i(time20.2)/j(dtime20.2)/k(datetime24.2). -begin data. -01-oct-78 -10/1/78 -78101 -3q96 -nov 52 -38wk23 -saturday -xi -10:01 -4 5:12.9 -01-feb-1903 04:05:06.07 -end data. -print /a to e. -print /f to k. -execute. - -data list /x 1. -begin data. -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -end data. -compute y=$time. -formats y(datetime25). -list. -compute z=$time. -formats z(datetime25). -list. -compute p=$time. -formats p(datetime25). -list. - diff --git a/tests/vector.stat b/tests/vector.stat deleted file mode 100644 index 8f702261..00000000 --- a/tests/vector.stat +++ /dev/null @@ -1,24 +0,0 @@ -title 'Test VECTOR utility'. - -data list /c 1(a). -begin data. -5 -3 -4 -1 -2 -end data. - -string x1 to x5 y1 to y5(a1). -vector x=x1 to x5. -*formats all(f1). -compute x(number(c))=c. -leave x1 to x5. -list. - -vector x=x1 to x5. -vector y=y1 to y5. -*formats all(f1). -compute y(number(c))=x(number(c)+1). -display vector. -list. -- 2.30.2