|
@@ -166,6 +166,20 @@ class ServerTests extends HaxeServerTestCase {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ function testSyntaxCache2() {
|
|
|
|
+ vfs.putContent("HelloWorld.hx", getTemplate("HelloWorld.hx"));
|
|
|
|
+ var args = ["-cp", ".", "--interp"];
|
|
|
|
+ runHaxeJson(args, ServerMethods.ReadClassPaths, null);
|
|
|
|
+ vfs.putContent("Empty.hx", getTemplate("Empty.hx"));
|
|
|
|
+ runHaxeJson([] /* No args here because file watchers don't generally know */, ServerMethods.ModuleCreated, {file: new FsPath("Empty.hx")});
|
|
|
|
+ runHaxeJson(args, DisplayMethods.Completion, {file: new FsPath("HelloWorld.hx"), offset: 75, wasAutoTriggered: false});
|
|
|
|
+ var completion = parseCompletion();
|
|
|
|
+ assertHasCompletion(completion, module -> switch (module.kind) {
|
|
|
|
+ case Type: module.args.path.typeName == "Empty";
|
|
|
|
+ case _: false;
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
function testVectorInliner() {
|
|
function testVectorInliner() {
|
|
vfs.putContent("Vector.hx", getTemplate("Vector.hx"));
|
|
vfs.putContent("Vector.hx", getTemplate("Vector.hx"));
|
|
vfs.putContent("VectorInliner.hx", getTemplate("VectorInliner.hx"));
|
|
vfs.putContent("VectorInliner.hx", getTemplate("VectorInliner.hx"));
|