@@ -86,8 +86,8 @@ public static void BuildFakeConfigs(IPostTestDirectoryRemover dirRemover)
86
86
{
87
87
var scd = new SelfCleaningDirectory ( dirRemover ) ;
88
88
89
- string global = null , xdg = null , system = null ;
90
- BuildFakeRepositoryOptions ( scd , out global , out xdg , out system ) ;
89
+ string global = null , xdg = null , system = null , programData = null ;
90
+ BuildFakeRepositoryOptions ( scd , out global , out xdg , out system , out programData ) ;
91
91
92
92
StringBuilder sb = new StringBuilder ( )
93
93
. AppendFormat ( "[Woot]{0}" , Environment . NewLine )
@@ -106,9 +106,15 @@ public static void BuildFakeConfigs(IPostTestDirectoryRemover dirRemover)
106
106
. AppendFormat ( "this-rocks = xdg{0}" , Environment . NewLine ) ;
107
107
File . WriteAllText ( Path . Combine ( xdg , "config" ) , sb . ToString ( ) ) ;
108
108
109
+ sb = new StringBuilder ( )
110
+ . AppendFormat ( "[Woot]{0}" , Environment . NewLine )
111
+ . AppendFormat ( "this-rocks = programdata{0}" , Environment . NewLine ) ;
112
+ File . WriteAllText ( Path . Combine ( programData , "config" ) , sb . ToString ( ) ) ;
113
+
109
114
GlobalSettings . SetConfigSearchPaths ( ConfigurationLevel . Global , global ) ;
110
115
GlobalSettings . SetConfigSearchPaths ( ConfigurationLevel . Xdg , xdg ) ;
111
116
GlobalSettings . SetConfigSearchPaths ( ConfigurationLevel . System , system ) ;
117
+ GlobalSettings . SetConfigSearchPaths ( ConfigurationLevel . ProgramData , programData ) ;
112
118
}
113
119
114
120
private static void CleanupTestReposOlderThan ( TimeSpan olderThan )
@@ -316,7 +322,7 @@ protected static void AssertValueInConfigFile(string configFilePath, string rege
316
322
Assert . True ( r . Success , text ) ;
317
323
}
318
324
319
- private static void BuildFakeRepositoryOptions ( SelfCleaningDirectory scd , out string global , out string xdg , out string system )
325
+ private static void BuildFakeRepositoryOptions ( SelfCleaningDirectory scd , out string global , out string xdg , out string system , out string programData )
320
326
{
321
327
string confs = Path . Combine ( scd . DirectoryPath , "confs" ) ;
322
328
Directory . CreateDirectory ( confs ) ;
@@ -327,6 +333,8 @@ private static void BuildFakeRepositoryOptions(SelfCleaningDirectory scd, out st
327
333
Directory . CreateDirectory ( xdg ) ;
328
334
system = Path . Combine ( confs , "my-system-config" ) ;
329
335
Directory . CreateDirectory ( system ) ;
336
+ programData = Path . Combine ( confs , "my-programdata-config" ) ;
337
+ Directory . CreateDirectory ( programData ) ;
330
338
}
331
339
332
340
/// <summary>
0 commit comments