<commit_before>doc: Built file to test tasks
default: task_for

properties:
  BUILD_DIR: '../../build'

targets:

  task_for:
    doc: Test for task
    steps:
    # for with a list
    - 'sum = 0'
    - for: i
      in:  [1, 2, 3]
      do:
      - print: '={i}'
      - 'sum += i'
    - |
      if sum != 6 {
        throw("For test failure")
      } else {
        println("For test success")
      }
    # for with an expression
    - 'sum = 0'
    - for: i
      in:  range(3)
      do:
      - print: '={i}'
      - 'sum += i'
    - |
      if sum != 3 {
        throw("For test failure")
      } else {
        println("For test success")
      }<commit_msg>Added coverage to for task<commit_after>doc: Built file to test tasks
default: task_for

properties:
  BUILD_DIR: '../../build'

targets:

  task_for:
    doc: Test for task
    steps:
    # for with a list
    - 'sum = 0'
    - for: i
      in:  [1, 2, 3]
      do:
      - print: '={i}'
      - 'sum += i'
    - |
      if sum != 6 {
        throw("For test failure")
      } else {
        println("For test success")
      }
    # for with an expression
    - 'sum = 0'
    - for: i
      in:  range(3)
      do:
      - print: '={i}'
      - 'sum += i'
    - |
      if sum != 3 {
        throw("For test failure")
      } else {
        println("For test success")
      }
    # for with an error
    - try:
      - for: i
        in:  [1, 2, 3]
        do:
        - throw: 'Test success'
      - throw: 'Test failure'
      catch:
      - if: '_error == "Test error"'
        then:
        - throw: 'For test error'
      - print: 'For test success'
{'fraction_non_alphanumeric': 0.14488286066584463, 'fraction_numerical': 0.011713933415536375, 'mean_word_length': 1.3590116279069768, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7415922', 'n_tokens_mistral': 582, 'n_tokens_neox': 557, 'n_words': 176}