<commit_before>@TestOn("vm")
library tekartik_pub.test.pub_test;

import 'package:path/path.dart';
import 'package:process_run/cmd_run.dart';
import 'package:dev_test/test.dart';
import 'package:tekartik_pub/pub.dart';
import 'package:tekartik_pub/script.dart';
import 'package:pubtest/src/pubtest_version.dart';
import 'package:pub_semver/pub_semver.dart';
import 'dart:io';

class TestScript extends Script {}

String get testScriptPath => getScriptPath(TestScript);

void main() => defineTests();

String get _pubPackageRoot => getPubPackageRootSync(testScriptPath);

String get pubTestDependenciesDartScript {
  PubPackage pkg = new PubPackage(_pubPackageRoot);
  return join(pkg.path, 'bin', 'pubtestdependencies.dart');
}

void defineTests() {
  //useVMConfiguration();
  group('pubtestdependencies', () {
    test('version', () async {
      ProcessResult result =
          await runCmd(dartCmd([pubTestDependenciesDartScript, '--version']));
      expect(result.stdout, contains("pubtestdependencies"));
      expect(new Version.parse(result.stdout.split(' ').last), version);
    });

    test('simple_dependencies', () async {
      PubPackage exampleSimplePkg = new PubPackage(join(_pubPackageRoot, 'example', 'simple'));
      await runCmd(exampleSimplePkg.getCmd(offline: true));
      ProcessResult result =
          await runCmd(dartCmd([pubTestDependenciesDartScript])
            ..connectStderr = true
            ..connectStdout = true..workingDirectory = exampleSimplePkg.path);

      // on 1.13, current windows is failing
      if (!Platform.isWindows) {
        expect(result.exitCode, 0);
      }

      expect(result.stdout.contains("All tests passed"), isTrue);
    });//, timeout: new Timeout(new Duration(minutes: 5)));
  });
}<commit_msg>test: test only on vm<commit_after>@TestOn("vm")
library tekartik_pub.test.pub_test;

import 'package:path/path.dart';
import 'package:process_run/cmd_run.dart';
import 'package:dev_test/test.dart';
import 'package:tekartik_pub/pub.dart';
import 'package:tekartik_pub/script.dart';
import 'package:pubtest/src/pubtest_version.dart';
import 'package:pub_semver/pub_semver.dart';
import 'dart:io';

class TestScript extends Script {}

String get testScriptPath => getScriptPath(TestScript);

void main() => defineTests();

String get _pubPackageRoot => getPubPackageRootSync(testScriptPath);

String get pubTestDependenciesDartScript {
  PubPackage pkg = new PubPackage(_pubPackageRoot);
  return join(pkg.path, 'bin', 'pubtestdependencies.dart');
}

void defineTests() {
  //useVMConfiguration();
  group('pubtestdependencies', () {
    test('version', () async {
      ProcessResult result =
          await runCmd(dartCmd([pubTestDependenciesDartScript, '--version']));
      expect(result.stdout, contains("pubtestdependencies"));
      expect(new Version.parse(result.stdout.split(' ').last), version);
    });

    test('simple_dependencies', () async {
      PubPackage exampleSimplePkg = new PubPackage(join(_pubPackageRoot, 'example', 'simple'));
      await runCmd(exampleSimplePkg.getCmd(offline: true));
      ProcessResult result =
          await runCmd(dartCmd([pubTestDependenciesDartScript, '-p', 'vm'])
            ..connectStderr = true
            ..connectStdout = true..workingDirectory = exampleSimplePkg.path);

      // on 1.13, current windows is failing
      if (!Platform.isWindows) {
        expect(result.exitCode, 0);
      }

      expect(result.stdout.contains("All tests passed"), isTrue);
    });//, timeout: new Timeout(new Duration(minutes: 5)));
  });
}
{'fraction_non_alphanumeric': 0.13820224719101123, 'fraction_numerical': 0.0028089887640449437, 'mean_word_length': 4.49537037037037, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3610381', 'n_tokens_mistral': 1094, 'n_tokens_neox': 1066, 'n_words': 208}