Only taint casereader if case size is unknown.
[pspp] / tests / formats / wkday-out.sh
1 #! /bin/sh
2
3 TEMPDIR=/tmp/pspp-tst-$$
4 mkdir -p $TEMPDIR
5 trap 'cd /; rm -rf $TEMPDIR' 0
6
7 # ensure that top_builddir  are absolute
8 if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
9 if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
10 top_builddir=`cd $top_builddir; pwd`
11 PSPP=$top_builddir/src/ui/terminal/pspp
12
13 # ensure that top_srcdir is absolute
14 top_srcdir=`cd $top_srcdir; pwd`
15
16 STAT_CONFIG_PATH=$top_srcdir/config
17 export STAT_CONFIG_PATH
18
19 fail()
20 {
21     echo $activity
22     echo FAILED
23     exit 1;
24 }
25
26
27 no_result()
28 {
29     echo $activity
30     echo NO RESULT;
31     exit 2;
32 }
33
34 pass()
35 {
36     exit 0;
37 }
38
39 cd $TEMPDIR
40
41 activity="write pspp syntax"
42 cat > wkday-out.pspp <<EOF
43 set errors=none.
44 set mxwarns=10000000.
45 set mxerrs=10000000.
46 data list /x 1-10.
47 begin data.
48
49 0
50 0.5
51 0.9
52 1
53 2
54 3
55 4
56 4.1
57 4.5
58 4.9
59 5
60 6
61 7
62 7.1
63 7.5
64 7.9
65 8
66 end data.
67 do repeat format=wkday2 to wkday40.
68 print outfile='wkday-out.out'/x(format).
69 end repeat.
70 execute.
71 EOF
72 if [ $? -ne 0 ] ; then no_result ; fi
73
74 activity="run program"
75 $SUPERVISOR $PSPP --testing-mode wkday-out.pspp
76 if [ $? -eq 0 ] ; then no_result ; fi
77
78 activity="compare output"
79 diff -u wkday-out.out - <<EOF 
80   .
81    .
82     .
83      .
84       .
85        .
86         .
87          .
88           .
89            .
90             .
91              .
92               .
93                .
94                 .
95                  .
96                   .
97                    .
98                     .
99                      .
100                       .
101                        .
102                         .
103                          .
104                           .
105                            .
106                             .
107                              .
108                               .
109                                .
110                                 .
111                                  .
112                                   .
113                                    .
114                                     .
115                                      .
116                                       .
117                                        .
118                                         .
119   .
120    .
121     .
122      .
123       .
124        .
125         .
126          .
127           .
128            .
129             .
130              .
131               .
132                .
133                 .
134                  .
135                   .
136                    .
137                     .
138                      .
139                       .
140                        .
141                         .
142                          .
143                           .
144                            .
145                             .
146                              .
147                               .
148                                .
149                                 .
150                                  .
151                                   .
152                                    .
153                                     .
154                                      .
155                                       .
156                                        .
157                                         .
158   .
159    .
160     .
161      .
162       .
163        .
164         .
165          .
166           .
167            .
168             .
169              .
170               .
171                .
172                 .
173                  .
174                   .
175                    .
176                     .
177                      .
178                       .
179                        .
180                         .
181                          .
182                           .
183                            .
184                             .
185                              .
186                               .
187                                .
188                                 .
189                                  .
190                                   .
191                                    .
192                                     .
193                                      .
194                                       .
195                                        .
196                                         .
197   .
198    .
199     .
200      .
201       .
202        .
203         .
204          .
205           .
206            .
207             .
208              .
209               .
210                .
211                 .
212                  .
213                   .
214                    .
215                     .
216                      .
217                       .
218                        .
219                         .
220                          .
221                           .
222                            .
223                             .
224                              .
225                               .
226                                .
227                                 .
228                                  .
229                                   .
230                                    .
231                                     .
232                                      .
233                                       .
234                                        .
235                                         .
236  SU
237  SUN
238  SUND
239  SUNDA
240  SUNDAY
241  SUNDAY 
242  SUNDAY  
243  SUNDAY   
244  SUNDAY    
245  SUNDAY     
246  SUNDAY      
247  SUNDAY       
248  SUNDAY        
249  SUNDAY         
250  SUNDAY          
251  SUNDAY           
252  SUNDAY            
253  SUNDAY             
254  SUNDAY              
255  SUNDAY               
256  SUNDAY                
257  SUNDAY                 
258  SUNDAY                  
259  SUNDAY                   
260  SUNDAY                    
261  SUNDAY                     
262  SUNDAY                      
263  SUNDAY                       
264  SUNDAY                        
265  SUNDAY                         
266  SUNDAY                          
267  SUNDAY                           
268  SUNDAY                            
269  SUNDAY                             
270  SUNDAY                              
271  SUNDAY                               
272  SUNDAY                                
273  SUNDAY                                 
274  SUNDAY                                  
275  MO
276  MON
277  MOND
278  MONDA
279  MONDAY
280  MONDAY 
281  MONDAY  
282  MONDAY   
283  MONDAY    
284  MONDAY     
285  MONDAY      
286  MONDAY       
287  MONDAY        
288  MONDAY         
289  MONDAY          
290  MONDAY           
291  MONDAY            
292  MONDAY             
293  MONDAY              
294  MONDAY               
295  MONDAY                
296  MONDAY                 
297  MONDAY                  
298  MONDAY                   
299  MONDAY                    
300  MONDAY                     
301  MONDAY                      
302  MONDAY                       
303  MONDAY                        
304  MONDAY                         
305  MONDAY                          
306  MONDAY                           
307  MONDAY                            
308  MONDAY                             
309  MONDAY                              
310  MONDAY                               
311  MONDAY                                
312  MONDAY                                 
313  MONDAY                                  
314  TU
315  TUE
316  TUES
317  TUESD
318  TUESDA
319  TUESDAY
320  TUESDAY 
321  TUESDAY  
322  TUESDAY   
323  TUESDAY    
324  TUESDAY     
325  TUESDAY      
326  TUESDAY       
327  TUESDAY        
328  TUESDAY         
329  TUESDAY          
330  TUESDAY           
331  TUESDAY            
332  TUESDAY             
333  TUESDAY              
334  TUESDAY               
335  TUESDAY                
336  TUESDAY                 
337  TUESDAY                  
338  TUESDAY                   
339  TUESDAY                    
340  TUESDAY                     
341  TUESDAY                      
342  TUESDAY                       
343  TUESDAY                        
344  TUESDAY                         
345  TUESDAY                          
346  TUESDAY                           
347  TUESDAY                            
348  TUESDAY                             
349  TUESDAY                              
350  TUESDAY                               
351  TUESDAY                                
352  TUESDAY                                 
353  WE
354  WED
355  WEDN
356  WEDNE
357  WEDNES
358  WEDNESD
359  WEDNESDA
360  WEDNESDAY
361  WEDNESDAY 
362  WEDNESDAY  
363  WEDNESDAY   
364  WEDNESDAY    
365  WEDNESDAY     
366  WEDNESDAY      
367  WEDNESDAY       
368  WEDNESDAY        
369  WEDNESDAY         
370  WEDNESDAY          
371  WEDNESDAY           
372  WEDNESDAY            
373  WEDNESDAY             
374  WEDNESDAY              
375  WEDNESDAY               
376  WEDNESDAY                
377  WEDNESDAY                 
378  WEDNESDAY                  
379  WEDNESDAY                   
380  WEDNESDAY                    
381  WEDNESDAY                     
382  WEDNESDAY                      
383  WEDNESDAY                       
384  WEDNESDAY                        
385  WEDNESDAY                         
386  WEDNESDAY                          
387  WEDNESDAY                           
388  WEDNESDAY                            
389  WEDNESDAY                             
390  WEDNESDAY                              
391  WEDNESDAY                               
392  WE
393  WED
394  WEDN
395  WEDNE
396  WEDNES
397  WEDNESD
398  WEDNESDA
399  WEDNESDAY
400  WEDNESDAY 
401  WEDNESDAY  
402  WEDNESDAY   
403  WEDNESDAY    
404  WEDNESDAY     
405  WEDNESDAY      
406  WEDNESDAY       
407  WEDNESDAY        
408  WEDNESDAY         
409  WEDNESDAY          
410  WEDNESDAY           
411  WEDNESDAY            
412  WEDNESDAY             
413  WEDNESDAY              
414  WEDNESDAY               
415  WEDNESDAY                
416  WEDNESDAY                 
417  WEDNESDAY                  
418  WEDNESDAY                   
419  WEDNESDAY                    
420  WEDNESDAY                     
421  WEDNESDAY                      
422  WEDNESDAY                       
423  WEDNESDAY                        
424  WEDNESDAY                         
425  WEDNESDAY                          
426  WEDNESDAY                           
427  WEDNESDAY                            
428  WEDNESDAY                             
429  WEDNESDAY                              
430  WEDNESDAY                               
431  WE
432  WED
433  WEDN
434  WEDNE
435  WEDNES
436  WEDNESD
437  WEDNESDA
438  WEDNESDAY
439  WEDNESDAY 
440  WEDNESDAY  
441  WEDNESDAY   
442  WEDNESDAY    
443  WEDNESDAY     
444  WEDNESDAY      
445  WEDNESDAY       
446  WEDNESDAY        
447  WEDNESDAY         
448  WEDNESDAY          
449  WEDNESDAY           
450  WEDNESDAY            
451  WEDNESDAY             
452  WEDNESDAY              
453  WEDNESDAY               
454  WEDNESDAY                
455  WEDNESDAY                 
456  WEDNESDAY                  
457  WEDNESDAY                   
458  WEDNESDAY                    
459  WEDNESDAY                     
460  WEDNESDAY                      
461  WEDNESDAY                       
462  WEDNESDAY                        
463  WEDNESDAY                         
464  WEDNESDAY                          
465  WEDNESDAY                           
466  WEDNESDAY                            
467  WEDNESDAY                             
468  WEDNESDAY                              
469  WEDNESDAY                               
470  WE
471  WED
472  WEDN
473  WEDNE
474  WEDNES
475  WEDNESD
476  WEDNESDA
477  WEDNESDAY
478  WEDNESDAY 
479  WEDNESDAY  
480  WEDNESDAY   
481  WEDNESDAY    
482  WEDNESDAY     
483  WEDNESDAY      
484  WEDNESDAY       
485  WEDNESDAY        
486  WEDNESDAY         
487  WEDNESDAY          
488  WEDNESDAY           
489  WEDNESDAY            
490  WEDNESDAY             
491  WEDNESDAY              
492  WEDNESDAY               
493  WEDNESDAY                
494  WEDNESDAY                 
495  WEDNESDAY                  
496  WEDNESDAY                   
497  WEDNESDAY                    
498  WEDNESDAY                     
499  WEDNESDAY                      
500  WEDNESDAY                       
501  WEDNESDAY                        
502  WEDNESDAY                         
503  WEDNESDAY                          
504  WEDNESDAY                           
505  WEDNESDAY                            
506  WEDNESDAY                             
507  WEDNESDAY                              
508  WEDNESDAY                               
509  TH
510  THU
511  THUR
512  THURS
513  THURSD
514  THURSDA
515  THURSDAY
516  THURSDAY 
517  THURSDAY  
518  THURSDAY   
519  THURSDAY    
520  THURSDAY     
521  THURSDAY      
522  THURSDAY       
523  THURSDAY        
524  THURSDAY         
525  THURSDAY          
526  THURSDAY           
527  THURSDAY            
528  THURSDAY             
529  THURSDAY              
530  THURSDAY               
531  THURSDAY                
532  THURSDAY                 
533  THURSDAY                  
534  THURSDAY                   
535  THURSDAY                    
536  THURSDAY                     
537  THURSDAY                      
538  THURSDAY                       
539  THURSDAY                        
540  THURSDAY                         
541  THURSDAY                          
542  THURSDAY                           
543  THURSDAY                            
544  THURSDAY                             
545  THURSDAY                              
546  THURSDAY                               
547  THURSDAY                                
548  FR
549  FRI
550  FRID
551  FRIDA
552  FRIDAY
553  FRIDAY 
554  FRIDAY  
555  FRIDAY   
556  FRIDAY    
557  FRIDAY     
558  FRIDAY      
559  FRIDAY       
560  FRIDAY        
561  FRIDAY         
562  FRIDAY          
563  FRIDAY           
564  FRIDAY            
565  FRIDAY             
566  FRIDAY              
567  FRIDAY               
568  FRIDAY                
569  FRIDAY                 
570  FRIDAY                  
571  FRIDAY                   
572  FRIDAY                    
573  FRIDAY                     
574  FRIDAY                      
575  FRIDAY                       
576  FRIDAY                        
577  FRIDAY                         
578  FRIDAY                          
579  FRIDAY                           
580  FRIDAY                            
581  FRIDAY                             
582  FRIDAY                              
583  FRIDAY                               
584  FRIDAY                                
585  FRIDAY                                 
586  FRIDAY                                  
587  SA
588  SAT
589  SATU
590  SATUR
591  SATURD
592  SATURDA
593  SATURDAY
594  SATURDAY 
595  SATURDAY  
596  SATURDAY   
597  SATURDAY    
598  SATURDAY     
599  SATURDAY      
600  SATURDAY       
601  SATURDAY        
602  SATURDAY         
603  SATURDAY          
604  SATURDAY           
605  SATURDAY            
606  SATURDAY             
607  SATURDAY              
608  SATURDAY               
609  SATURDAY                
610  SATURDAY                 
611  SATURDAY                  
612  SATURDAY                   
613  SATURDAY                    
614  SATURDAY                     
615  SATURDAY                      
616  SATURDAY                       
617  SATURDAY                        
618  SATURDAY                         
619  SATURDAY                          
620  SATURDAY                           
621  SATURDAY                            
622  SATURDAY                             
623  SATURDAY                              
624  SATURDAY                               
625  SATURDAY                                
626  SA
627  SAT
628  SATU
629  SATUR
630  SATURD
631  SATURDA
632  SATURDAY
633  SATURDAY 
634  SATURDAY  
635  SATURDAY   
636  SATURDAY    
637  SATURDAY     
638  SATURDAY      
639  SATURDAY       
640  SATURDAY        
641  SATURDAY         
642  SATURDAY          
643  SATURDAY           
644  SATURDAY            
645  SATURDAY             
646  SATURDAY              
647  SATURDAY               
648  SATURDAY                
649  SATURDAY                 
650  SATURDAY                  
651  SATURDAY                   
652  SATURDAY                    
653  SATURDAY                     
654  SATURDAY                      
655  SATURDAY                       
656  SATURDAY                        
657  SATURDAY                         
658  SATURDAY                          
659  SATURDAY                           
660  SATURDAY                            
661  SATURDAY                             
662  SATURDAY                              
663  SATURDAY                               
664  SATURDAY                                
665  SA
666  SAT
667  SATU
668  SATUR
669  SATURD
670  SATURDA
671  SATURDAY
672  SATURDAY 
673  SATURDAY  
674  SATURDAY   
675  SATURDAY    
676  SATURDAY     
677  SATURDAY      
678  SATURDAY       
679  SATURDAY        
680  SATURDAY         
681  SATURDAY          
682  SATURDAY           
683  SATURDAY            
684  SATURDAY             
685  SATURDAY              
686  SATURDAY               
687  SATURDAY                
688  SATURDAY                 
689  SATURDAY                  
690  SATURDAY                   
691  SATURDAY                    
692  SATURDAY                     
693  SATURDAY                      
694  SATURDAY                       
695  SATURDAY                        
696  SATURDAY                         
697  SATURDAY                          
698  SATURDAY                           
699  SATURDAY                            
700  SATURDAY                             
701  SATURDAY                              
702  SATURDAY                               
703  SATURDAY                                
704  SA
705  SAT
706  SATU
707  SATUR
708  SATURD
709  SATURDA
710  SATURDAY
711  SATURDAY 
712  SATURDAY  
713  SATURDAY   
714  SATURDAY    
715  SATURDAY     
716  SATURDAY      
717  SATURDAY       
718  SATURDAY        
719  SATURDAY         
720  SATURDAY          
721  SATURDAY           
722  SATURDAY            
723  SATURDAY             
724  SATURDAY              
725  SATURDAY               
726  SATURDAY                
727  SATURDAY                 
728  SATURDAY                  
729  SATURDAY                   
730  SATURDAY                    
731  SATURDAY                     
732  SATURDAY                      
733  SATURDAY                       
734  SATURDAY                        
735  SATURDAY                         
736  SATURDAY                          
737  SATURDAY                           
738  SATURDAY                            
739  SATURDAY                             
740  SATURDAY                              
741  SATURDAY                               
742  SATURDAY                                
743   .
744    .
745     .
746      .
747       .
748        .
749         .
750          .
751           .
752            .
753             .
754              .
755               .
756                .
757                 .
758                  .
759                   .
760                    .
761                     .
762                      .
763                       .
764                        .
765                         .
766                          .
767                           .
768                            .
769                             .
770                              .
771                               .
772                                .
773                                 .
774                                  .
775                                   .
776                                    .
777                                     .
778                                      .
779                                       .
780                                        .
781                                         .
782 EOF
783 if [ $? -ne 0 ] ; then fail ; fi
784
785 pass