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: .
77 File label: This is a test file label
79 Documents in the active dataset:
81 document First line of a document
83 Second line of a document
85 The last line should end with a period: .
95 File label: This is a test file label
97 Documents in the active dataset:
99 document First line of a document
101 Second line of a document
103 The last line should end with a period: .
113 document There should be another document now.
117 Documents in the active dataset:
119 document First line of a document
121 Second line of a document
123 The last line should end with a period: .
133 document There should be another document now.
137 File label: This is a test file label