File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ suite('Extension Test Suite', () => {
65
65
await getHaskellConfig ( ) . update ( 'logFile' , 'hls.log' ) ;
66
66
await getHaskellConfig ( ) . update ( 'trace.server' , 'messages' ) ;
67
67
await getHaskellConfig ( ) . update ( 'releasesDownloadStoragePath' , path . normalize ( getWorkspaceFile ( 'bin' ) . fsPath ) ) ;
68
+ await getHaskellConfig ( ) . update ( 'serverEnvironment' , { XDG_CACHE_HOME : path . normalize ( getWorkspaceFile ( 'cache-test' ) . fsPath ) } ) ;
68
69
const contents = new TextEncoder ( ) . encode ( 'main = putStrLn "hi vscode tests"' ) ;
69
70
await vscode . workspace . fs . writeFile ( getWorkspaceFile ( 'Main.hs' ) , contents ) ;
70
71
} ) ;
@@ -99,6 +100,14 @@ suite('Extension Test Suite', () => {
99
100
assert . ok ( await withTimeout ( 30 , existsWorkspaceFile ( 'hls.log' ) ) , 'Server log not created in 30 seconds' ) ;
100
101
} ) ;
101
102
103
+ test ( 'Server should inherit environment variables defined in the settings' , async ( ) => {
104
+ await vscode . workspace . openTextDocument ( getWorkspaceFile ( 'Main.hs' ) ) ;
105
+ assert . ok (
106
+ await withTimeout ( 30 , existsWorkspaceFile ( 'cache-test/*.hiedb' ) ) ,
107
+ 'Server did not inherit XDG_CACHE_DIR from environment variables set in the settings'
108
+ ) ;
109
+ } ) ;
110
+
102
111
suiteTeardown ( async ( ) => {
103
112
disposables . forEach ( ( d ) => d . dispose ( ) ) ;
104
113
await vscode . commands . executeCommand ( CommandNames . StopServerCommandName ) ;
You can’t perform that action at this time.
0 commit comments