// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter_tools/src/windows/property_sheet.dart';
import '../../src/common.dart';
void main() {
group('Property Sheet', () {
test('Base file matches expected format', () async {
const String baseFile = '''
''';
const PropertySheet sheet = PropertySheet();
expect(sheet.toString(), baseFile);
});
test('Environment variable generate the correct elements', () async {
const Map environment = {'FOO': 'Bar'};
const PropertySheet sheet = PropertySheet(environmentVariables: environment);
final String propsContent = sheet.toString();
expect(propsContent, contains('Bar'));
expect(propsContent, contains('''
\$(FOO)
true
'''));
});
test('Include paths generate the correct elements', () async {
const PropertySheet sheet = PropertySheet(includePaths: ['foo/bar', 'baz']);
final String propsContent = sheet.toString();
expect(propsContent, contains('foo/bar;baz;%(AdditionalIncludeDirectories)'));
});
test('Library dependencies generate the correct elements', () async {
const PropertySheet sheet = PropertySheet(libraryDependencies: ['foo.lib', 'bar.lib']);
final String propsContent = sheet.toString();
expect(propsContent, contains('foo.lib;bar.lib;%(AdditionalDependencies)'));
});
});
}