@@ -0,0 +1,26 @@
+package cases.issues;
+
+import haxe.io.Path;
+class Issue11480 extends TestCase {
+ function test(_) {
+ vfs.putContent("Main.hx", "function main() {}");
+ var args = [
+ "-main",
+ "Main",
+ "-hl",
+ "bin/out.hl",
+ "-D",
+ "no-compilation"
+ ];
+ runHaxe(args);
+ assertSuccess();
+ var std = Path.removeTrailingSlashes(utils.macro.BuildHub.getStd());
+ runHaxeJsonCb(args, DisplayMethods.Hover, {file: new FsPath('${std}/StdTypes.hx'), offset: 0}, (res) -> {
+ // If we don't use the cb version, assertSuccess() below will pass even when request fails..
+ Assert.isNull(res);
+ });
+ }
+}
@@ -0,0 +1,7 @@
+package utils.macro;
+class BuildHub {
+ macro static public function build();
+ macro static public function getStd();
@@ -19,6 +19,11 @@ class BuildHub {
return TestBuilder.build(fields);
}
+ macro static public function getStd() {
+ var std = haxe.macro.Compiler.getConfiguration().stdPath;
+ return macro $v{std.shift()};
static function isDisplayTest(cls:ClassType):Bool {
if(cls.pack.length == 0 && cls.name == "DisplayTestCase") {
return true;