Skip to content

Commit

Permalink
Update launchNeovimAndRunTests.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
saidelike authored May 18, 2024
1 parent 0de88ec commit d40ee68
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions packages/test-harness/src/launchNeovimAndRunTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export async function launchNeovimAndRunTests(extensionTestsPath: string) {

// testing normal nvim startup
//https://stackoverflow.com/questions/3025615/is-there-a-vim-runtime-log

/*
const { status, signal, error } = cp.spawnSync(cli, [`-V9`], {
encoding: "utf-8",
stdio: "inherit",
Expand All @@ -147,9 +147,9 @@ export async function launchNeovimAndRunTests(extensionTestsPath: string) {
console.log(`Exiting early`);
process.exit(0);

*/

const nvim_process = cp.spawn(cli, [], {
const nvim_process = cp.spawn(cli, [ "-V9vim.log" ], {
env: {
...process.env,
// "NVIM_NODE_HOST_DEBUG": "1",
Expand All @@ -165,6 +165,18 @@ export async function launchNeovimAndRunTests(extensionTestsPath: string) {

console.log(`pid: ${nvim_process.pid}`);

const tail2 = new Tail("vim.log", {
// separator: "\n",
fromBeginning: true,
});
tail2.on("line", function (data: string) {
console.log(data);
});
tail2.on("error", function (error) {
console.log("ERROR: ", error);
});
console.log("tail2 started done");

await delay(10000);

readdirSync(`${getCursorlessRepoRoot()}/packages/cursorless-neovim/out/`).forEach((file) => {
Expand Down

0 comments on commit d40ee68

Please sign in to comment.