Build native Flutter Linux manager and deb release 0.2.5
This commit is contained in:
1 parent
3c6c4a0e90
commit
03e729a60b
35 files changed
+757
-69
No files matched your search
@@ -0,0 +1,42 @@
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:ads_manager/data/app_paths.dart';
|
||||
|
||||
void main() {
|
||||
test('Linux config and logs respect separate XDG directories', () {
|
||||
const env = {
|
||||
'HOME': '/home/tt',
|
||||
'XDG_CONFIG_HOME': '/config',
|
||||
'XDG_STATE_HOME': '/state',
|
||||
};
|
||||
expect(
|
||||
AppPaths.configuration(environment: env, windows: false),
|
||||
'/config/ads-flutter',
|
||||
);
|
||||
expect(
|
||||
AppPaths.logs(environment: env, windows: false),
|
||||
'/state/ads-flutter/logs',
|
||||
);
|
||||
});
|
||||
test('Linux default locations persist outside temporary directories', () {
|
||||
const env = {'HOME': '/home/tt'};
|
||||
expect(
|
||||
AppPaths.configuration(environment: env, windows: false),
|
||||
'/home/tt/.config/ads-flutter',
|
||||
);
|
||||
expect(
|
||||
AppPaths.logs(environment: env, windows: false),
|
||||
'/home/tt/.local/state/ads-flutter/logs',
|
||||
);
|
||||
});
|
||||
test('Windows keeps existing settings and log paths', () {
|
||||
const env = {'LOCALAPPDATA': r'C:\Users\TT\AppData\Local'};
|
||||
expect(
|
||||
AppPaths.configuration(environment: env, windows: true),
|
||||
r'C:\Users\TT\AppData\Local\TTSTD\ADS-Flutter',
|
||||
);
|
||||
expect(
|
||||
AppPaths.logs(environment: env, windows: true),
|
||||
r'C:\Users\TT\AppData\Local\TTSTD\ADS-Flutter\logs',
|
||||
);
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user