<commit_before>// Copyright (c) 2012, 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.

library pub_tests;

import 'dart:io';

import 'test_pub.dart';
import '../../../pkg/unittest/lib/unittest.dart';

final USAGE_STRING = """
    Pub is a package manager for Dart.

    Usage: pub command [arguments]

    Global options:
    -h, --help            Print this usage information.
        --version         Print pub version.
        --[no-]trace      Print debugging information when an error occurs.
        --verbosity       Control output verbosity.

              [all]       All output including internal tracing messages are shown.
              [io]        IO operations are also shown.
              [normal]    Errors, warnings, and user messages are shown.

    -v, --verbose         Shortcut for "--verbosity=all"

    Available commands:
      help       Display help information for Pub.
      install    Install the current package's dependencies.
      publish    Publish the current package to pub.dartlang.org.
      update     Update the current package's dependencies to the latest versions.
      uploader   Manage uploaders for a package on pub.dartlang.org.
      version    Print pub version.

    Use "pub help [command]" for more information about a command.
    """;

final VERSION_STRING = '''
    Pub 0.1.2+3
    ''';

main() {
  integration('running pub with no command displays usage', () {
    schedulePub(args: [], output: USAGE_STRING);
  });

  integration('running pub with just --help displays usage', () {
    schedulePub(args: ['--help'], output: USAGE_STRING);
  });

  integration('running pub with just -h displays usage', () {
    schedulePub(args: ['-h'], output: USAGE_STRING);<commit_msg>Call init test config for generating human-friendly test results. Review URL: https://codereview.chromium.org//12218062<commit_after>// Copyright (c) 2012, 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.

library pub_tests;

import 'dart:io';

import 'test_pub.dart';
import '../../../pkg/unittest/lib/unittest.dart';

final USAGE_STRING = """
    Pub is a package manager for Dart.

    Usage: pub command [arguments]

    Global options:
    -h, --help            Print this usage information.
        --version         Print pub version.
        --[no-]trace      Print debugging information when an error occurs.
        --verbosity       Control output verbosity.

              [all]       All output including internal tracing messages are shown.
              [io]        IO operations are also shown.
              [normal]    Errors, warnings, and user messages are shown.

    -v, --verbose         Shortcut for "--verbosity=all"

    Available commands:
      help       Display help information for Pub.
      install    Install the current package's dependencies.
      publish    Publish the current package to pub.dartlang.org.
      update     Update the current package's dependencies to the latest versions.
      uploader   Manage uploaders for a package on pub.dartlang.org.
      version    Print pub version.

    Use "pub help [command]" for more information about a command.
    """;

final VERSION_STRING = '''
    Pub 0.1.2+3
    ''';

main() {
  initConfig();
  
  integration('running pub with no command displays usage', () {
    schedulePub(args: [], output: USAGE_STRING);
  });

  integration('running pub with just --help displays usage', () {
    schedulePub(args: ['--help'], output: USAGE_STRING);
  });

  integration('running pub with just -h displays usage', () {
    schedulePub(args: ['-h'], output: USAGE_STRING);
{'fraction_non_alphanumeric': 0.0987877224658241, 'fraction_numerical': 0.006190353366004642, 'mean_word_length': 2.5190562613430125, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '2949818', 'n_tokens_mistral': 1050, 'n_tokens_neox': 1004, 'n_words': 411}