View | Details | Raw Unified | Return to bug 48936
Collapse All | Expand All

(-)src/ooxml/testcases/org/apache/poi/xssf/strings.txt (+81 lines)
Line 0 Link Here
1
[IntegrityCheck-ERROR[MALE[50.0 < x < 199.0], FEMALE[50.0 < x < 199.0]], IntegrityCheck-WARNING[MALE[61.0 < x < 126.0], FEMALE[47.0 < x < 119.0]]]
2
Computing[($1 + $2 + $3)/3,[Instrument[BloodPressure, RES_FIRST_DIASTOLIC_BP], Instrument[BloodPressure, RES_SEC_DIASTOLIC_BP], Instrument[BloodPressure, RES_THIRD_DIASTOLIC_BP]]]
3
COMPUTED
4
BloodPressure
5
BloodPressure
6
Average Pulse Rate
7
Moyenne des lectures de pouls
8
Computing[($1 + $2 + $3)/3,[Instrument[BloodPressure, RES_FIRST_PULSE_RATE], Instrument[BloodPressure, RES_SEC_PULSE_RATE], Instrument[BloodPressure, RES_THIRD_PULSE_RATE]]]
9
COMPUTED
10
BloodPressure
11
BloodPressure
12
Average Systolic Blood Pressure
13
Pression artérielle systolique moyenne
14
Computing[($1 + $2 + $3)/3,[Instrument[BloodPressure, RES_FIRST_SYSTOLIC_BP], Instrument[BloodPressure, RES_SEC_SYSTOLIC_BP], Instrument[BloodPressure, RES_THIRD_SYSTOLIC_BP]]]
15
COMPUTED
16
BloodPressure
17
BloodPressure
18
BloodPressure
19
BloodPressure
20
BloodPressure
21
BloodPressure
22
BloodPressure
23
BloodPressure
24
BloodPressure
25
Armband size used
26
Taille du brassard utilisé
27
MANUAL
28
Small
29
Petit
30
Medium
31
Moyen
32
Large
33
Grand
34
Extra Large
35
Très grand
36
BloodPressure
37
BloodPressure
38
Arm suggested to be used for measurement
39
Bras suggéré pour la mesure
40
Variable[Onyx.CIPreliminaryQuestionnaire.BP_ARM_CHOSEN]
41
AUTOMATIC
42
false
43
BloodPressure
44
BloodPressure
45
What arm was actually used for the measurements?
46
Quel bras a été utilisé pour les mesures?
47
MANUAL
48
Left
49
Gauche
50
Right
51
Droit
52
BloodPressure
53
BloodPressure
54
Circumference of upper arm at midpoint
55
Circonférence du haut du bras
56
[IntegrityCheck-ERROR[MALE[17.0 < x < 50.0], FEMALE[17.0 < x < 50.0]]]
57
MANUAL
58
BloodPressure
59
BloodPressure
60
Diastolic Blood Pressure reading (1)
61
Lecture de la pression artérielle diastolique (1)
62
[IntegrityCheck-ERROR[MALE[30 < x < 200 || ], FEMALE[30 < x < 200 || ]], IntegrityCheck-WARNING[MALE[51 < x < 96 || ], FEMALE[51 < x < 96 || ]], IntegrityCheck-ERROR[x < RES_FIRST_SYSTOLIC_BP]]
63
MANUAL
64
BloodPressure
65
BloodPressure
66
Pulse Rate reading (1)
67
Lecture de pouls (1)
68
[IntegrityCheck-ERROR[MALE[30 < x < 200 || ], FEMALE[30 < x < 200 || ]], IntegrityCheck-WARNING[MALE[40 < x < 100 || ], FEMALE[40 < x < 100 || ]]]
69
MANUAL
70
BloodPressure
71
BloodPressure
72
Systolic Blood Pressure reading (1)
73
Lecture de la pression artérielle systolique  (1)
74
[IntegrityCheck-ERROR[MALE[30 < x < 300 || ], FEMALE[30 < x < 300 || ]], IntegrityCheck-WARNING[MALE[77 < x < 192 || ], FEMALE[77 < x < 192 || ]]]
75
MANUAL
76
BloodPressure
77
BloodPressure
78
Diastolic Blood Pressure reading (2)
79
Lecture de la pression artérielle diastolique (2)
80
[IntegrityCheck-ERROR[MALE[30 < x < 200 || ], FEMALE[30 < x < 200 || ]], IntegrityCheck-WARNING[MALE[51 < x < 96 || ], FEMALE[51 < x < 96 || ]], IntegrityCheck-ERROR[x < RES_SEC_SYSTOLIC_BP]]
81
0
  + native
82
  + native
(-)src/ooxml/testcases/org/apache/poi/xssf/TestBrokenCdata.java (+69 lines)
Line 0 Link Here
1
/* ====================================================================
2
   Licensed to the Apache Software Foundation (ASF) under one or more
3
   contributor license agreements.  See the NOTICE file distributed with
4
   this work for additional information regarding copyright ownership.
5
   The ASF licenses this file to You under the Apache License, Version 2.0
6
   (the "License"); you may not use this file except in compliance with
7
   the License.  You may obtain a copy of the License at
8
9
       http://www.apache.org/licenses/LICENSE-2.0
10
11
   Unless required by applicable law or agreed to in writing, software
12
   distributed under the License is distributed on an "AS IS" BASIS,
13
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
   See the License for the specific language governing permissions and
15
   limitations under the License.
16
==================================================================== */
17
18
package org.apache.poi.xssf;
19
20
import java.io.BufferedReader;
21
import java.io.File;
22
import java.io.FileInputStream;
23
import java.io.FileOutputStream;
24
import java.io.IOException;
25
import java.io.InputStreamReader;
26
import java.util.ArrayList;
27
import java.util.List;
28
29
import junit.framework.TestCase;
30
31
import org.apache.poi.ss.usermodel.Sheet;
32
import org.apache.poi.ss.usermodel.Workbook;
33
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
34
35
/**
36
 * 
37
 * @author Philippe Laflamme
38
 */
39
public final class TestBrokenCdata extends TestCase {
40
41
	public void testWritingSomeStringsResultsInMalformedCdata() throws IOException {
42
		File tmp = File.createTempFile("test", ".xlsx");
43
44
		Workbook w = new XSSFWorkbook();
45
		Sheet s = w.createSheet();
46
		int i = 0;
47
		for (String str : readStrings("strings.txt")) {
48
			s.createRow(i++).createCell(0).setCellValue(str);
49
		}
50
		w.write(new FileOutputStream(tmp));
51
		
52
		// This throws an exception due to malformed XML in sharedStrings.xml
53
		w = new XSSFWorkbook(new FileInputStream(tmp));
54
	}
55
56
	private List<String> readStrings(String filename) throws IOException {
57
		List<String> strs = new ArrayList<String>();
58
		BufferedReader br = new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(
59
				filename)));
60
		String s;
61
		while ((s = br.readLine()) != null) {
62
			if (s.trim().length() > 0) {
63
				strs.add(s.trim());
64
			}
65
		}
66
		br.close();
67
		return strs;
68
	}
69
}
0
  + native
70
  + native

Return to bug 48936