File: env.test

package info (click to toggle)
atheist 0.20110402-2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 1,332 kB
  • ctags: 902
  • sloc: python: 4,764; xml: 626; makefile: 113; cpp: 54; ansic: 5; sh: 5
file content (22 lines) | stat: -rw-r--r-- 630 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# -*- mode: python; coding: utf-8 -*-

opts = ""

# undefined -> define
Test("$atheist -v %s $testdir/env.mtest" % opts, timeout=10,
     env={"VAR_UA":"var defined",
          "VAR_DA":"former value",
          "VAR_DOI":"former",
          "VAR_SUFFIX":"suffix"})

# defined -> replace
Test("$atheist -v %s $testdir/env.mtest" % opts,  timeout=10,
     env={"VAR_DA":"former value",
          "VAR_DOI":"former",
          "VAR_SUFFIX":"suffix"})

t = Test("""
         export SAMPLE_VAR="hola"
         $atheist -o -s 'Test("echo $SAMPLE_VAR", shell=True)'
         """,  timeout=10, shell=True)
t.post += FileContains("hola")