Intentionally broken for testing purposes.

This commit is contained in:
Unknown
2018-09-03 15:50:25 -04:00
parent d3dbeec5ab
commit 1564b4f710
3 changed files with 11 additions and 8 deletions

3
ps.go
View File

@@ -27,7 +27,8 @@ func init() {
// data in the Go Document struct- you will have to implement syncing // data in the Go Document struct- you will have to implement syncing
// them yourself. // them yourself.
func ApplyDataset(name string) error { func ApplyDataset(name string) error {
_, err := DoJS("applyDataset.jsx", name) data, err := DoJS("applyDataset.jsx", name)
panic(fmt.Sprint("data:", string(data)))
return err return err
} }

View File

@@ -15,6 +15,7 @@ func TestApplyDataset(t *testing.T) {
wantErr bool wantErr bool
}{ }{
{"Ignite_1", false}, {"Ignite_1", false},
{"Loyal Trooper_1", false},
} }
for _, tt := range tests { for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) { t.Run(tt.name, func(t *testing.T) {

View File

@@ -1,15 +1,16 @@
var saveFile = File(arguments[0]); var saveFile = File(arguments[0]);
if(saveFile.exists) if(saveFile.exists)
saveFile.remove(); saveFile.remove();
var idAply = charIDToTypeID("Aply");
var desc1 = new ActionDescriptor(); var desc1 = new ActionDescriptor();
var idnull = charIDToTypeID("null");
var ref1 = new ActionReference(); var ref1 = new ActionReference();
var iddataSetClass = stringIDToTypeID("dataSetClass"); ref1.putName(stringIDToTypeID("dataSetClass"), arguments[1]);
ref1.putName(iddataSetClass, arguments[1]); desc1.putReference(charIDToTypeID("null"), ref1);
desc1.putReference(idnull, ref1); desc = executeAction(charIDToTypeID("Aply"), desc1, DialogModes.NO);
executeAction(idAply, desc1, DialogModes.NO);
saveFile.encoding = "UTF8"; saveFile.encoding = "UTF8";
saveFile.open("e", "TEXT", "????"); saveFile.open("e", "TEXT", "????");
saveFile.writeln("done!"); saveFile.write("args: ");
for (i = 0; i < arguments.length; i++) {
saveFile.write(arguments[i] + ",");
}
saveFile.writeln();
saveFile.close(); saveFile.close();