-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from jtmcdole/main
First pr; test merge queue
- Loading branch information
Showing
5 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# https://dart.dev/guides/libraries/private-files | ||
# Created by `dart pub` | ||
.dart_tool/ | ||
pubspec.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# This file configures the static analysis results for your project (errors, | ||
# warnings, and lints). | ||
# | ||
# This enables the 'recommended' set of lints from `package:lints`. | ||
# This set helps identify many issues that may lead to problems when running | ||
# or consuming Dart code, and enforces writing Dart using a single, idiomatic | ||
# style and format. | ||
# | ||
# If you want a smaller set of lints you can change this to specify | ||
# 'package:lints/core.yaml'. These are just the most critical lints | ||
# (the recommended set includes the core lints). | ||
# The core lints are also what is used by pub.dev for scoring packages. | ||
|
||
include: package:lints/recommended.yaml | ||
|
||
# Uncomment the following section to specify additional rules. | ||
|
||
# linter: | ||
# rules: | ||
# - camel_case_types | ||
|
||
# analyzer: | ||
# exclude: | ||
# - path/to/excluded/files/** | ||
|
||
# For more information about the core and recommended set of lints, see | ||
# https://dart.dev/go/core-lints | ||
|
||
# For additional information about configuring this file, see | ||
# https://dart.dev/guides/language/analysis-options |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: flaux | ||
description: A sample command-line application with basic argument parsing. | ||
version: 0.0.1 | ||
# repository: https://github.com/my_org/my_repo | ||
environment: | ||
sdk: 3.5.3 | ||
|
||
# Add regular dependencies here. | ||
dependencies: | ||
args: ^2.4.2 | ||
|
||
dev_dependencies: | ||
lints: ^4.0.0 | ||
test: ^1.24.0 | ||
path: ^1.9.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import 'dart:io'; | ||
|
||
import 'package:test/expect.dart'; | ||
import 'package:test/scaffolding.dart'; | ||
import 'package:path/path.dart' as path; | ||
|
||
main() { | ||
|
||
String delayInSeconds = String.fromEnvironment('test_delay', defaultValue: "0.0"); | ||
final seconds = double.parse(delayInSeconds); | ||
final testDelay = Duration(seconds: seconds.toInt(), milliseconds: (seconds.remainder(1) * 1000).toInt()); | ||
|
||
tearDown(() async { | ||
print('waiting $testDelay'); | ||
await Future.delayed(testDelay); | ||
}); | ||
|
||
test('passes', () { | ||
print('this test should pass'); | ||
expect(true, true); | ||
}); | ||
|
||
test('fails if "fail.dart" present', () async { | ||
final dir = Directory('lib'); | ||
if (!await dir.exists()) { | ||
return; | ||
} | ||
final files = await dir.list().toList(); | ||
expect(files.any((f) { | ||
if (f is! File) return false; | ||
return path.equals('lib/fail.dart', f.path); | ||
}), isFalse); | ||
}); | ||
} |