Skip to content
This repository has been archived by the owner on May 29, 2023. It is now read-only.

Commit

Permalink
Merge pull request #9 from dart-lang/devoncarew_veyor
Browse files Browse the repository at this point in the history
add support for appveyor
  • Loading branch information
devoncarew committed Mar 23, 2015
2 parents d9a9cbf + 4c50748 commit d87422e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -3,6 +3,7 @@
A library to reflect on the local pub cache.

[![Build Status](https://travis-ci.org/dart-lang/pub_cache.svg)](https://travis-ci.org/dart-lang/pub_cache)
[![Build status](https://ci.appveyor.com/api/projects/status/w75vsabfhgmo93hq/branch/master?svg=true)](https://ci.appveyor.com/project/devoncarew/pub-cache/branch/master)
[![Coverage Status](https://img.shields.io/coveralls/dart-lang/pub_cache.svg)](https://coveralls.io/r/dart-lang/pub_cache?branch=master)

## Features and bugs
Expand Down
17 changes: 17 additions & 0 deletions appveyor.yml
@@ -0,0 +1,17 @@
# Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.

install:
- cinst -y dart-sdk
- ps: $env:PATH = "$env:PATH;c:\tools\dart-sdk\bin"
- ps: $env:PATH = "$env:PATH;c:\Users\appveyor\AppData\Roaming\Pub\Cache\bin"
- pub get

build: off

test_script:
- dartanalyzer --fatal-warnings example\list.dart lib\pub_cache.dart test\all.dart
# We need at least one activated application for our test suite.
- pub global activate dart_coveralls
- dart test\all.dart
8 changes: 4 additions & 4 deletions test/pub_cache_test.dart
Expand Up @@ -10,21 +10,21 @@ import 'package:path/path.dart' as path;
import 'package:pub_cache/pub_cache.dart';
import 'package:unittest/unittest.dart';

void main() => defineTests();

void defineTests() {
final String cacheDirName = Platform.isWindows ? 'Cache' : 'pub-cache';

group('PubCache', () {
test('getSystemCacheLocation', () {
Directory cacheDir = PubCache.getSystemCacheLocation();
expect(cacheDir, isNotNull);
expect(path.basename(cacheDir.path), contains('pub-cache'));
expect(path.basename(cacheDir.path), contains(cacheDirName));
});

test('PubCache', () {
PubCache cache = new PubCache();
expect(cache, isNotNull);
expect(cache.location, isNotNull);
expect(path.basename(cache.location.path), contains('pub-cache'));
expect(path.basename(cache.location.path), contains(cacheDirName));
});

test('getBinaries', () {
Expand Down

0 comments on commit d87422e

Please sign in to comment.