Sha256: aca666d8f984accdb2d1d97191a8443404bc74f71af271254b04bdd422d6106a

Contents?: true

Size: 1.21 KB

Versions: 5

Compression:

Stored size: 1.21 KB

Contents

---

Test the env feature in TestTCmd (env_cmd.yml):
  strategy: Suite
  attributes:
    strategy: Cmd
    command: ruby -e "print ENV['FOO']"
    exit: 0

  contents:

    - 'simple env':
        env:
          FOO: bar
          DISPLAY: 'foo.bar:0'
        output: "bar"

    - 'set symtbl[:bar] to 42':
        strategy: Block
        test: '@symtbl[:bar] = 42'
        weight: 0

    - 'advanced test <<bar>>':
        env: { FOO: '<<bar>>' }
        output: 42

    - 'set symtbl[:foo] to 44':
        strategy: Block
        test: '@symtbl[:foo] = 44'
        weight: 0

    - 'double substitution test <<bar>>':
        env: { FOO: '<<bar>>43<<foo>>' }
        output: '424344'

    - Suite env dispatch:
        symbols:
          env:
            A: B
            C: <<pwd>>/D
        attributes:
          strategy: Block
        contents:
          - Verify A in env:
              test: "ENV['A'] == 'B'"
          - Verify the suffix of C in env:
              test: "ENV['C'] =~ /\/D$/"
          - Verify the prefix of C in env:
              test: "ENV['C'] == '<<pwd>>/D'"
          - Append something to A:
              symbols:
                env:
                  A: $A:E
              test: "ENV['A'] == 'B:E'"

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ttk-0.1.576 test/ttk-minimal/env_cmd.yml
ttk-0.2.1 test/ttk-minimal/env_cmd.yml
ttk-0.1.579 test/ttk-minimal/env_cmd.yml
ttk-0.1.580 test/ttk-minimal/env_cmd.yml
ttk-0.2.0 test/ttk-minimal/env_cmd.yml