1 AT_BANNER([TITLE and related commands])
3 AT_SETUP([FILE LABEL and (ADD) DOCUMENT])
4 AT_DATA([file-label.sps], [dnl
5 /* Set up a dummy active dataset in memory.
15 /* Add value labels for some further testing of value labels.
16 value labels x y 1 'first label' 2 'second label' 3 'third label'.
17 add value labels x 1 'first label mark two'.
19 /* Add a file label and a few documents.
20 file label This is a test file label.
21 document First line of a document
22 Second line of a document
23 The last line should end with a period: .
26 /* Display the documents.
30 ADD DOCUMENT 'Line one' 'Line two'.
32 /* Save the active dataset then get it and display the documents again.
33 save /OUTFILE='foo.save'.
38 /* There is an interesting interaction that occurs if the 'execute'
39 /* command below. What happens is that an error message is output
40 /* at the next 'save' command that 'foo.save' is already open for
41 /* input. This is because the 'get' hasn't been executed yet and
42 /* therefore PSPP would be reading from and writing to the same
43 /* file at once, which is obviously a Bad Thing. But 'execute'
44 /* here clears up that potential problem.
47 /* Add another (shorter) document and try again.
48 document There should be another document now.
52 save /OUTFILE='foo.save'.
59 AT_CHECK([pspp -o pspp.csv file-label.sps])
60 dnl Filter out the dates/times
61 AT_CHECK([[sed 's/(Entered [^)]*)/(Entered <date>)/' pspp.csv]], [0], [dnl
62 Table: Reading 1 record from INLINE.
63 Variable,Record,Columns,Format
67 Documents in the active dataset:
69 document First line of a document
71 Second line of a document
73 The last line should end with a period: .
79 This is a test file label
81 Documents in the active dataset:
83 document First line of a document
85 Second line of a document
87 The last line should end with a period: .
99 This is a test file label
101 Documents in the active dataset:
103 document First line of a document
105 Second line of a document
107 The last line should end with a period: .
117 document There should be another document now.
121 Documents in the active dataset:
123 document First line of a document
125 Second line of a document
127 The last line should end with a period: .
137 document There should be another document now.
143 This is a test file label