This repository has been archived by the owner on Dec 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Before, package:file/testing.dart was a library containing testing utilities. That library depended on package:test. However, we explicitly didn't declare a dependency on `test` in the pubspec.yaml because most users of package:file don't want that dependency. Unfortunately, there's no way to have library-specific sections within a pubspec.yaml. So in order to declare that those testing utilities did in fact depend on `package:test`, we had to publish them as a separate package. This change does just that, as `package:file_testing`.
- Loading branch information
Showing
95 changed files
with
151 additions
and
22 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 |
---|---|---|
|
@@ -3,8 +3,6 @@ | |
.buildlog | ||
.dart_tool/ | ||
.pub/ | ||
build/ | ||
packages | ||
.packages | ||
|
||
# Or the files created by dart2js. | ||
|
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 |
---|---|---|
@@ -1,9 +1,8 @@ | ||
language: dart | ||
|
||
dart: | ||
- dev | ||
|
||
dart_task: | ||
- test | ||
- dartanalyzer | ||
- dartfmt | ||
env: | ||
- SHARD=dartfmt | ||
- SHARD=analyze | ||
- SHARD=tests | ||
install: | ||
- ./dev/bots/travis_install.sh | ||
script: | ||
- ./dev/bots/travis_script.sh |
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
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,20 @@ | ||
#!/bin/bash | ||
set -ex | ||
|
||
echo "$PWD" | ||
|
||
export PATH="$HOME/dart-sdk/bin:$PATH" | ||
export ROOT="$PWD" | ||
export PACKAGES=("file" "file_testing") | ||
|
||
wget \ | ||
--tries=3 \ | ||
--output-document=dart-sdk.zip \ | ||
https://storage.googleapis.com/dart-archive/channels/dev/release/latest/sdk/dartsdk-linux-x64-release.zip | ||
echo "Unzipping dart-sdk..." | ||
unzip dart-sdk.zip -d "$HOME" > /dev/null | ||
|
||
for package in "${PACKAGES[@]}"; do | ||
cd $ROOT/packages/$package | ||
pub get | ||
done |
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,20 @@ | ||
#!/bin/bash | ||
set -ex | ||
|
||
export PATH="$HOME/dart-sdk/bin:$PATH" | ||
export ROOT="$PWD" | ||
export PACKAGES=("file" "file_testing") | ||
|
||
if [[ "$SHARD" == "dartfmt" ]]; then | ||
dartfmt --dry-run --set-exit-if-changed packages || exit $? | ||
elif [[ "$SHARD" == "analyze" ]]; then | ||
for package in "${PACKAGES[@]}"; do | ||
echo "Analyzing packages/$package" | ||
cd $ROOT/packages/$package | ||
dartanalyzer --options=$ROOT/analysis_options.yaml . || exit $? | ||
done | ||
else | ||
# tests shard | ||
cd $ROOT/packages/file | ||
pub run test -j1 -rexpanded || exit $? | ||
fi |
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
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
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
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
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
File renamed without changes.
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
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
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
File renamed without changes.
File renamed without changes.
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,9 @@ | ||
#### 2.0.0 | ||
|
||
* Removed `record_replay_matchers.dart` from API | ||
|
||
#### 1.0.0 | ||
|
||
* Moved `package:file/testing.dart` library into a dedicated package so that | ||
libraries don't need to take on a transitive dependency on `package:test` | ||
in order to use `package: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,26 @@ | ||
Copyright 2017, the Dart project authors. All rights reserved. | ||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are | ||
met: | ||
|
||
* Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
* Redistributions in binary form must reproduce the above | ||
copyright notice, this list of conditions and the following | ||
disclaimer in the documentation and/or other materials provided | ||
with the distribution. | ||
* Neither the name of Google Inc. nor the names of its | ||
contributors may be used to endorse or promote products derived | ||
from this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
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,32 @@ | ||
# file_testing | ||
|
||
Testing utilities intended to work with `package:file` | ||
|
||
## Features | ||
|
||
This package provides a series of matchers to be used in tests that work with file | ||
system types. | ||
|
||
## Usage | ||
|
||
```dart | ||
import 'package:file/file.dart'; | ||
import 'package:file_testing/file_testing.dart'; | ||
import 'package:test/test.dart'; | ||
test('some test', () { | ||
MemoryFileSystem fs; | ||
setUp(() { | ||
fs = new MemoryFileSystem(); | ||
fs.file('/foo').createSync(); | ||
}); | ||
expectFileSystemException(ErrorCodes.ENOENT, () { | ||
fs.directory('').resolveSymbolicLinksSync(); | ||
}); | ||
expect(fs.file('/path/to/file'), isFile); | ||
expect(fs.file('/path/to/directory'), isDirectory); | ||
expect(fs.file('/foo'), exists); | ||
}); | ||
``` |
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
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
File renamed without changes.
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,13 @@ | ||
name: file_testing | ||
version: 2.0.0 | ||
authors: | ||
- Todd Volkert <tvolkert@google.com> | ||
description: Testing utilities for package:file | ||
homepage: https://github.com/google/file.dart/packages/file_testing | ||
|
||
dependencies: | ||
meta: ^1.1.2 | ||
test: ^0.12.33 | ||
|
||
environment: | ||
sdk: '>=2.0.0-dev.28.0 <2.0.0' |