@@ -86,8 +86,8 @@ public static void BuildFakeConfigs(IPostTestDirectoryRemover dirRemover)
8686 {
8787 var scd = new SelfCleaningDirectory ( dirRemover ) ;
8888
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 ) ;
9191
9292 StringBuilder sb = new StringBuilder ( )
9393 . AppendFormat ( "[Woot]{0}" , Environment . NewLine )
@@ -106,9 +106,15 @@ public static void BuildFakeConfigs(IPostTestDirectoryRemover dirRemover)
106106 . AppendFormat ( "this-rocks = xdg{0}" , Environment . NewLine ) ;
107107 File . WriteAllText ( Path . Combine ( xdg , "config" ) , sb . ToString ( ) ) ;
108108
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+
109114 GlobalSettings . SetConfigSearchPaths ( ConfigurationLevel . Global , global ) ;
110115 GlobalSettings . SetConfigSearchPaths ( ConfigurationLevel . Xdg , xdg ) ;
111116 GlobalSettings . SetConfigSearchPaths ( ConfigurationLevel . System , system ) ;
117+ GlobalSettings . SetConfigSearchPaths ( ConfigurationLevel . ProgramData , programData ) ;
112118 }
113119
114120 private static void CleanupTestReposOlderThan ( TimeSpan olderThan )
@@ -316,7 +322,7 @@ protected static void AssertValueInConfigFile(string configFilePath, string rege
316322 Assert . True ( r . Success , text ) ;
317323 }
318324
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 )
320326 {
321327 string confs = Path . Combine ( scd . DirectoryPath , "confs" ) ;
322328 Directory . CreateDirectory ( confs ) ;
@@ -327,6 +333,8 @@ private static void BuildFakeRepositoryOptions(SelfCleaningDirectory scd, out st
327333 Directory . CreateDirectory ( xdg ) ;
328334 system = Path . Combine ( confs , "my-system-config" ) ;
329335 Directory . CreateDirectory ( system ) ;
336+ programData = Path . Combine ( confs , "my-programdata-config" ) ;
337+ Directory . CreateDirectory ( programData ) ;
330338 }
331339
332340 /// <summary>
0 commit comments