9922b.diff
| new/src/com/goldencode/harness/test/TestFactory.java 2025-06-02 05:05:57 +0000 | ||
|---|---|---|
| 17 | 17 |
** 008 TJD 20241029 Added support for streams |
| 18 | 18 |
** TJD 20241112 Added support for JUnit reports |
| 19 | 19 |
** TJD 20250116 Support for StreamWaitFor variable substitution |
| 20 |
** 009 TJD 20250423 Allow specifying encoding of external files |
|
| 20 | 21 |
*/ |
| 21 | 22 | |
| 22 | 23 |
/* |
| ... | ... | |
| 798 | 799 |
// option 1: read the screen region from a file |
| 799 | 800 |
fname = elem.getAttribute(ATTR_FILENAME); |
| 800 | 801 |
|
| 802 |
// get encoding |
|
| 803 |
String encoding = elem.getAttribute(ATTR_ENCODING); |
|
| 804 |
|
|
| 801 | 805 |
// honor search paths |
| 802 | 806 |
fname = index.findBaseLine(fname); |
| 803 | 807 |
|
| ... | ... | |
| 809 | 813 |
{
|
| 810 | 814 |
try |
| 811 | 815 |
{
|
| 812 |
FileReader fr = new FileReader(screen); |
|
| 813 |
BufferedReader br = new BufferedReader(fr); |
|
| 816 |
InputStream fis = new FileInputStream(screen); |
|
| 817 |
InputStreamReader fr = encoding == null ? |
|
| 818 |
new InputStreamReader(fis) : |
|
| 819 |
new InputStreamReader(fis, encoding); |
|
| 820 |
BufferedReader br = new BufferedReader(fr); |
|
| 814 | 821 |
|
| 815 | 822 |
line = br.readLine(); |
| 816 | 823 |
int yIdx = 0; |
| ... | ... | |
| 826 | 833 |
yIdx++; |
| 827 | 834 |
line = br.readLine(); |
| 828 | 835 |
} |
| 829 |
|
|
| 836 |
br.close(); |
|
| 830 | 837 |
found = true; |
| 831 | 838 |
} |
| 832 | 839 |
|