<commit_before>---
misc_shorthand_short_long:
  usage: |+
    usage: prog [options] --long
    options: -x
      -l --long
      --short
  runs:
  - prog: -l
    expect:
      -x: false
      --long: true
      --short: false
  - prog: --long
    expect:
      -x: false
      --long: true
      --short: false
  - prog: -x --long
    expect:
      -x: true
      --long: true
      --short: false
  - prog: -lx
    expect:
      -x: true
      --long: true
      --short: false
  - prog: --short -l
    expect:
      -x: false
      --long: true
      --short: true
  - prog: --short
    expect: "user-error"
misc_error_requires_argument_or_required:
  usage: |+
    usage:
      prog --foo=<arg> [-r <arg>] [-a <arg>] [<arg>]
      prog dash [-]
    options:
      --foo <arg>
      -a <arg>      [default: value]
      -r <arg>
  runs:
  - prog: --foo
    expect: user-error
    because: "--foo requires argument"
  - prog: --foo -
    expect:
      --foo: "-"
      -a: value
      -r:
      <arg>:
      dash: false
      "-": false
  - prog: -r
    expect: user-error
  - prog: --foo bar -r
    expect: user-error
    because: "-r requires argument"
  - prog: --foo - -r-
    expect:
      --foo: "-"
      -a: value
      -r: "-"
      <arg>:
      dash: false
      "-": false
  - prog: --foo - -r -
    expect:
      --foo: "-"
      -a: value
      -r: "-"
      <arg>:
      dash: false
      "-": false
  - prog: --foo arg
    expect:
      --foo: "arg"
      -a: value
      -r:
      <arg>:
      dash: false
      "-": false
  - prog: --foo=- -
    expect:
      --foo: "-"
      -a: value
      -r:
      <arg>: "-"
      dash: false
      "-": false
  - prog: dash
    expect:
      --foo:
      -a: value
      -r:
      <arg>:
      dash: true
      "-": false
  - prog: dash -
    expect:
      --foo:
      -a: value
      -r:
      <arg>:
      dash: true
      "-": true
misc_long_requires_argument:
  usage: |+
    usage:
      prog --foo=<arg> [-r <arg>] [-a <arg>] [<arg>]
    options:
      --foo <arg>
      -a <arg>      [default: value]
      -r <arg>
  runs:
  - prog: --foo
    expect: user-error
    because: "--foo requires argument"
misc_dash_party:
  usage: |+
    usage: prog [-]...
  runs:
  - prog: ""
    expect:
      "-": 0
  - prog: "- - -"
    expect:
      "-": 3
<commit_msg>add some tests<commit_after>---
misc_shorthand_short_long:
  usage: |+
    usage: prog [options] --long
    options: -x
      -l --long
      --short
  runs:
  - prog: -l
    expect:
      -x: false
      --long: true
      --short: false
  - prog: --long
    expect:
      -x: false
      --long: true
      --short: false
  - prog: -x --long
    expect:
      -x: true
      --long: true
      --short: false
  - prog: -lx
    expect:
      -x: true
      --long: true
      --short: false
  - prog: --short -l
    expect:
      -x: false
      --long: true
      --short: true
  - prog: --short
    expect: "user-error"
misc_error_requires_argument_or_required:
  usage: |+
    usage:
      prog --foo=<arg> [-r <arg>] [-a <arg>] [<arg>]
      prog dash [-]
    options:
      --foo <arg>
      -a <arg>      [default: value]
      -r <arg>
  runs:
  - prog: --foo
    expect: user-error
    because: "--foo requires argument"
  - prog: --foo -
    expect:
      --foo: "-"
      -a: value
      -r:
      <arg>:
      dash: false
      "-": false
  - prog: -r
    expect: user-error
  - prog: --foo bar -r
    expect: user-error
    because: "-r requires argument"
  - prog: --foo - -r-
    expect:
      --foo: "-"
      -a: value
      -r: "-"
      <arg>:
      dash: false
      "-": false
  - prog: --foo - -r -
    expect:
      --foo: "-"
      -a: value
      -r: "-"
      <arg>:
      dash: false
      "-": false
  - prog: --foo arg
    expect:
      --foo: "arg"
      -a: value
      -r:
      <arg>:
      dash: false
      "-": false
  - prog: --foo=- -
    expect:
      --foo: "-"
      -a: value
      -r:
      <arg>: "-"
      dash: false
      "-": false
  - prog: dash
    expect:
      --foo:
      -a: value
      -r:
      <arg>:
      dash: true
      "-": false
  - prog: dash -
    expect:
      --foo:
      -a: value
      -r:
      <arg>:
      dash: true
      "-": true
misc_long_requires_argument:
  usage: |+
    usage:
      prog --foo=<arg> [-r <arg>] [-a <arg>] [<arg>]
    options:
      --foo <arg>
      -a <arg>      [default: value]
      -r <arg>
  runs:
  - prog: --foo
    expect: user-error
    because: "--foo requires argument"
misc_dash_party:
  usage: |+
    usage: prog [-]...
  runs:
  - prog: ""
    expect:
      "-": 0
  - prog: "- - -"
    expect:
      "-": 3
misc_short_long_alt:
  usage: |+
    usage: prog --one
      prog -t
      prog --foo...
      prog -b...
    options:
      -o --one
      -t --two
      -f --foo
      -b --bar
  runs:
    - prog: --one
      expect:
        --one: true
        --two: false
        --foo: 0
        --bar: 0
    - prog: -o
      expect:
        --one: true
        --two: false
        --foo: 0
        --bar: 0
    - prog: -t
      expect:
        --one: false
        --two: true
        --foo: 0
        --bar: 0
    - prog: --two
      expect:
        --one: false
        --two: true
        --foo: 0
        --bar: 0
    - prog: -f --foo -ff --foo
      expect:
        --one: false
        --two: false
        --foo: 5
        --bar: 0
    - prog: -b --bar -bb --bar
      expect:
        --one: false
        --two: false
        --foo: 0
        --bar: 5

{'fraction_non_alphanumeric': 0.17746632690207498, 'fraction_numerical': 0.0029122679286494356, 'mean_word_length': 1.1061709467228824, 'pattern_counts': {'":': 18, '<': 45, '<?xml version=': 0, '>': 45, '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': '5587523', 'n_tokens_mistral': 2101, 'n_tokens_neox': 2004, 'n_words': 551}