B-1_14-DEV merge back to main

This commit is contained in:
clay_shooter
2008-02-02 01:38:25 +00:00
parent cd58b57a99
commit df0ba33797
97 changed files with 12208 additions and 8816 deletions

View File

@@ -5,24 +5,30 @@ import com.jacob.activeX.ActiveXComponent;
import com.jacob.com.ComException;
/**
* This test verifies patch SF 1794811 .
* It shows how unicode filenames throw exceptions in 1.13M4 and earlier.
* This test verifies patch SF 1794811 . It shows how unicode filenames throw
* exceptions in 1.13M4 and earlier.
*
* @author justme84
*
*
*/
public class UnicodeErrorTest extends BaseTestCase {
/**
* verifies that messages can now have unicode in them like when the file
* names have unicode characters
*/
public void testUnicodeCharactersInErrorMessage() {
ActiveXComponent application = new ActiveXComponent("Word.Application");
ActiveXComponent documents = application.getPropertyAsComponent("Documents");
ActiveXComponent documents = application
.getPropertyAsComponent("Documents");
String fileName = "abc\u0411\u0412\u0413\u0414def";
try {
documents.invoke("Open", fileName);
fail("Should have thrown an exception");
} catch (ComException e) {
assertTrue("Error message should contain file name with unicode " +
"characters in it. "+e.getMessage(),
e.getMessage().indexOf(fileName) > 0);
assertTrue("Error message should contain file name with unicode "
+ "characters in it. " + e.getMessage(), e.getMessage()
.indexOf(fileName) > 0);
}
}
}