Brodie Rao avatar Brodie Rao committed c775599

Added a long option for -E

Comments (0)

Files changed (2)

                  help='answer yes to all questions')
     p.add_option('-n', '--no', action='store_true',
                  help='answer no to all questions')
+    p.add_option('-E', '--preserve-env', action='store_true',
+                 help="don't reset common environment variables")
     p.add_option('--keep-tmpdir', action='store_true',
                  help='keep temporary directories')
     p.add_option('--indent', action='store', default=2, metavar='NUM',
                  type='int', help='number of spaces to use for indentation')
-    p.add_option('-E', action='store_false', dest='sterilize', default=True,
-                 help="don't reset common environment variables")
     opts, paths = p.parse_args(args)
 
     if opts.version:
     for s in ('TMPDIR', 'TEMP', 'TMP'):
         os.environ[s] = proctmp
 
-    if opts.sterilize:
+    if not opts.preserve_env:
         for s in ('LANG', 'LC_ALL', 'LANGUAGE'):
             os.environ[s] = 'C'
         os.environ['TZ'] = 'GMT'
   [Uu]sage: cram \[OPTIONS\] TESTS\.\.\. (re)
   
   [Oo]ptions: (re)
-    -h, --help         show this help message and exit
-    -V, --version      show version information and exit
-    -q, --quiet        don't print diffs
-    -v, --verbose      show filenames and test status
-    -i, --interactive  interactively merge changed test output
-    -y, --yes          answer yes to all questions
-    -n, --no           answer no to all questions
-    --keep-tmpdir      keep temporary directories
-    --indent=NUM       number of spaces to use for indentation
-    -E                 don't reset common environment variables
+    -h, --help          show this help message and exit
+    -V, --version       show version information and exit
+    -q, --quiet         don't print diffs
+    -v, --verbose       show filenames and test status
+    -i, --interactive   interactively merge changed test output
+    -y, --yes           answer yes to all questions
+    -n, --no            answer no to all questions
+    -E, --preserve-env  don't reset common environment variables
+    --keep-tmpdir       keep temporary directories
+    --indent=NUM        number of spaces to use for indentation
   $ cram -V
   Cram CLI testing framework (version 0.5)
   
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.