You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9130145
Browse filesBrowse the repository at this point in the historyBrowse files
constwaitFor=async(label,probe,ready)=>{for(leti=0;i<100;i++){constresult=awaitprobe();if(ready(result))returnresult;awaitsleep(100);}throwError(`${label} did not become ready`);};
3
4
exports.run=async()=>{
4
5
constext=vscode.extensions.getExtension('soplang.soplang');assert(ext,'Installed extension was not found');assert(!ext.extensionPath.includes('vsCodeLanguageSupport'),'Test must load the installed VSIX');
constroot=vscode.workspace.workspaceFolders[0].uri.fsPath;constfile=path.join(root,'host.sop');constsource='teed items=[1,2]\nhawl add(abn a, abn b): abn { celi a+b }\nqor(items.hore())';fs.writeFileSync(file,source);letdoc=awaitvscode.workspace.openTextDocument(file);awaitvscode.window.showTextDocument(doc);
assert(ext.isActive,'Opening a Soplang file did not activate the installed extension');
9
-
letcompletions;for(leti=0;i<100;i++){completions=awaitvscode.commands.executeCommand('vscode.executeCompletionItemProvider',doc.uri,newvscode.Position(2,12));if(completions?.items?.some(item=>item.label==='geli'))break;awaitsleep(100);}assert(completions?.items?.some(item=>item.label==='geli'),'Completion provider did not become ready');
assert.equal(vscode.workspace.getConfiguration().get('cSpell.enabled'),before);assert(doc.isDirty);assert.equal(fs.readFileSync(file,'utf8'),source,'Opening or analyzing a file wrote to disk');
constfinished=newPromise((resolve,reject)=>{consttimer=setTimeout(()=>reject(Error('Compiler task did not finish')),30000);constlistener=vscode.tasks.onDidEndTaskProcess(e=>{if(e.execution.task.source==='Soplang'){clearTimeout(timer);listener.dispose();resolve(e.exitCode);}});});
0 commit comments