Source

pyyaml-legacy / experimental / insert.yml

Full commit
tests:
    - data:
        - foo
        - bar
      command:
        value: baz
      expected:
        - foo
        - bar
        - baz
    - data:
        - apple
        - banana
      command:
        value: carrot
      expected:
        - apple
        - banana
        - carrot
    -
      data: 
        - foo
      command:
        value: 
          name: steve
          sport: hoops
      expected:
        - foo
        - name: steve
          sport: hoops
    -
      data: 
        persons:
         - name: steve
         - name: clark
        tasks:
          - task: eat
          - task: sleep
      command:
        ypath: /persons
        value: 
          name: brian
      expected:
        persons:
         - name: steve
         - name: clark
         - name: brian
        tasks:
          - task: eat
          - task: sleep
    -
      data: 
        folks:
         - name: steve
         - name: clark
        tasks:
          - task: eat
          - task: sleep
      command:
        ypath: /folks
        value: 
          name: ryan
      expected:
        folks: 
         - name: steve
         - name: clark
         - name: ryan
        tasks:
          - task: eat
          - task: sleep