<commit_before>Feature: Command Line Processing
  As an estimator I want to be able to
  call Est as a command line tool

  Scenario: Help can be printed
    When I run bin/est with "-h"
    Then Exit code is zero
    And Stdout contains "-v, --verbose"

  Scenario: Version can be printed
    When I run bin/est with "--version"
    Then Exit code is zero

  Scenario: Simple estimate calculating, in XML
    Given I have a "sample.est" file with content:
    """
    date: 19-08-2017
    author: <NAME>
    method: champions.pert
    scope:
      1: basic Sinatra scaffolding
      2: front-end HAML files
      3: SASS stylesheet
      4: five model classes with unit tests
      5: PostgreSQL migrations
      6: Cucumber tests for PostgreSQL
      7: Capybara tests for HTML front
      8: CasperJS tests
      9: achieve 80% test coverage
    champions:
      7:
        worst-case: 40
        best-case: 10
        most-likely: 18
      4:
        worst-case: 30
        best-case: 8
        most-likely: 16
    """
    When I run bin/est with "-v -d . -t xml -f out.xml"
    Then Exit code is zero
    And Stdout contains "reading ."
    And XML file "out.xml" matches "/estimate[total='79']"

  Scenario: Simple estimate calculating, in Text
    Given I have a "sample.est" file with content:
    """
    date: 19-08-2017
    author: <NAME>
    method: champions.pert
    scope:
      1: basic Sinatra scaffolding
      2: front-end HAML files
      3: SASS stylesheet
      4: five model classes with unit tests
      5: PostgreSQL migrations
      6: Cucumber tests for PostgreSQL
      7: Capybara tests for HTML front
      8: CasperJS tests
      9: achieve 80% test coverage
    champions:
      7:
        worst-case: 40
        best-case: 10
        most-likely: 18
      4:
        worst-case: 30
        best-case: 8
        most-likely: 16
    """
    When I run bin/est with "-d ."
    Then Exit code is zero
    And Stdout contains "Total: 79"
    And Stdout contains "2014-08-19: 79 hours by <NAME>"

  Scenario: Rejects unknown options
    Given I have a "test.est" file with content:
    """
    """
    When I run bin/est with "--some-unknown-option"
    Then Exit code is not zero<commit_msg>typo in test<commit_after>Feature: Command Line Processing
  As an estimator I want to be able to
  call Est as a command line tool

  Scenario: Help can be printed
    When I run bin/est with "-h"
    Then Exit code is zero
    And Stdout contains "-v, --verbose"

  Scenario: Version can be printed
    When I run bin/est with "--version"
    Then Exit code is zero

  Scenario: Simple estimate calculating, in XML
    Given I have a "sample.est" file with content:
    """
    date: 19-08-2017
    author: <NAME>
    method: champions.pert
    scope:
      1: basic Sinatra scaffolding
      2: front-end HAML files
      3: SASS stylesheet
      4: five model classes with unit tests
      5: PostgreSQL migrations
      6: Cucumber tests for PostgreSQL
      7: Capybara tests for HTML front
      8: CasperJS tests
      9: achieve 80% test coverage
    champions:
      7:
        worst-case: 40
        best-case: 10
        most-likely: 18
      4:
        worst-case: 30
        best-case: 8
        most-likely: 16
    """
    When I run bin/est with "-v -d . -t xml -f out.xml"
    Then Exit code is zero
    And Stdout contains "reading ."
    And XML file "out.xml" matches "/estimate[total='79']"

  Scenario: Simple estimate calculating, in Text
    Given I have a "sample.est" file with content:
    """
    date: 19-08-2012
    author: <NAME>
    method: champions.pert
    scope:
      1: basic Sinatra scaffolding
      2: front-end HAML files
      3: SASS stylesheet
      4: five model classes with unit tests
      5: PostgreSQL migrations
      6: Cucumber tests for PostgreSQL
      7: Capybara tests for HTML front
      8: CasperJS tests
      9: achieve 80% test coverage
    champions:
      7:
        worst-case: 40
        best-case: 10
        most-likely: 18
      4:
        worst-case: 30
        best-case: 8
        most-likely: 16
    """
    When I run bin/est with "-d ."
    Then Exit code is zero
    And Stdout contains "Total: 79"
    And Stdout contains "2012-08-19: 79 hours by <NAME>"

  Scenario: Rejects unknown options
    Given I have a "test.est" file with content:
    """
    """
    When I run bin/est with "--some-unknown-option"
    Then Exit code is not zero
{'fraction_non_alphanumeric': 0.07707910750507099, 'fraction_numerical': 0.03515889114266396, 'mean_word_length': 2.0543702684101857, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, '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': '3265173', 'n_tokens_mistral': 1466, 'n_tokens_neox': 1347, 'n_words': 567}