|
@@ -6,6 +6,7 @@
|
|
|
//
|
|
|
|
|
|
import Foundation
|
|
|
+import AppKit
|
|
|
|
|
|
class TextColorAutoTest : AutoTest {
|
|
|
|
|
@@ -29,7 +30,29 @@ class TextColorAutoTest : AutoTest {
|
|
|
|
|
|
// Auto Test refrence Check File
|
|
|
override func autoTest() {
|
|
|
+ let originPath = self.originFilePath()
|
|
|
|
|
|
+ // ...
|
|
|
+ // 执行转换过程
|
|
|
+
|
|
|
+ let resultPath = self.resultFilePath()
|
|
|
+ if self.isResultFileExist() {
|
|
|
+ // 转换成功
|
|
|
+ let checkPath = self.checkFilePath()
|
|
|
+
|
|
|
+ let checkData = NSData.init(contentsOfFile: checkPath) as! Data
|
|
|
+ var cDocumentAttributes:NSDictionary!
|
|
|
+ let checkAttString = NSAttributedString.init(rtf: checkData, documentAttributes: &cDocumentAttributes)
|
|
|
+
|
|
|
+ let resultData = NSData.init(contentsOfFile: resultPath) as! Data
|
|
|
+ var rDocumentAttributes:NSDictionary!
|
|
|
+ let resultAttString = NSAttributedString.init(rtf: resultData, documentAttributes: &rDocumentAttributes)
|
|
|
+
|
|
|
+ NSLog("\(checkAttString)")
|
|
|
+ } else {
|
|
|
+ reportString = NSAttributedString.init(string: "\n【\(self.type())】转档失败!\n",
|
|
|
+ attributes:[.foregroundColor : NSColor.red])
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// Auto Test refrence Latest Status
|