Commits

Brodie Rao  committed 8a99ee2

Added rst patch

  • Participants
  • Parent commits 4d0d1ca

Comments (0)

Files changed (2)

+# HG changeset patch
+# Parent b6068c163092fd8f6da048c190f485e62b89ad68
+
+diff --git a/examples/bare.t b/examples/bare.t
+--- a/examples/bare.t
++++ b/examples/bare.t
+@@ -1,1 +1,3 @@
++::
++
+   $ true
+diff --git a/examples/env.t b/examples/env.t
+--- a/examples/env.t
++++ b/examples/env.t
+@@ -1,4 +1,4 @@
+-Check environment variables:
++Check environment variables::
+ 
+   $ echo "$LANG"
+   C
+diff --git a/examples/fail.t b/examples/fail.t
+--- a/examples/fail.t
++++ b/examples/fail.t
+@@ -1,4 +1,4 @@
+-Wrong output and bad regexes:
++Wrong output and bad regexes::
+ 
+   $ echo 1
+   2
+@@ -7,7 +7,7 @@ Wrong output and bad regexes:
+   foo\ (re)
+    (re)
+ 
+-Offset regular expression:
++Offset regular expression::
+ 
+   $ printf 'foo\n\n1\n'
+   
+diff --git a/examples/skip.t b/examples/skip.t
+--- a/examples/skip.t
++++ b/examples/skip.t
+@@ -1,5 +1,5 @@
+ This test is considered "skipped" because it exits with return code
+ 80. This is useful for skipping tests that only work on certain
+-platforms or in certain settings.
++platforms or in certain settings::
+ 
+   $ exit 80
+diff --git a/examples/test.t b/examples/test.t
+--- a/examples/test.t
++++ b/examples/test.t
+@@ -1,4 +1,4 @@
+-Simple commands:
++Simple commands::
+ 
+   $ echo foo
+   foo
+@@ -6,7 +6,7 @@ Simple commands:
+   bar
+   baz
+ 
+-Multi-line command:
++Multi-line command::
+ 
+   $ foo() {
+   >     echo bar
+@@ -14,34 +14,34 @@ Multi-line command:
+   $ foo
+   bar
+ 
+-Regular expression:
++Regular expression::
+ 
+   $ echo foobarbaz
+   foobar.* (re)
+ 
+-Glob:
++Glob::
+ 
+   $ printf '* \\foobarbaz {10}\n'
+   \* \\fo?bar* {10} (glob)
+ 
+-Literal match ending in (re) and (glob):
++Literal match ending in (re) and (glob)::
+ 
+   $ echo 'foo\Z\Z\Z bar (re)'
+   foo\Z\Z\Z bar (re)
+   $ echo 'baz??? quux (glob)'
+   baz??? quux (glob)
+ 
+-Exit code:
++Exit code::
+ 
+   $ (exit 1)
+   [1]
+ 
+-Write to stderr:
++Write to stderr::
+ 
+   $ echo foo >&2
+   foo
+ 
+-No newline:
++No newline::
+ 
+   $ python -c 'import sys; sys.stdout.write("foo"); sys.stdout.flush()'
+   foo%
+diff --git a/tests/cram.t b/tests/cram.t
+--- a/tests/cram.t
++++ b/tests/cram.t
+@@ -1,5 +1,5 @@
+ The $PYTHON environment variable should be set when running this test
+-from Python.
++from Python::
+ 
+   $ [ -n "$PYTHON" ] || PYTHON="`which python`"
+   $ if [ -n "$COVERAGE" ]; then
+@@ -10,7 +10,7 @@ from Python.
+   > fi
+   $ command -v md5 > /dev/null || alias md5=md5sum
+ 
+-Usage:
++Usage::
+ 
+   $ cram -h
+   [Uu]sage: cram \[OPTIONS\] TESTS\.\.\. (re)
+@@ -41,12 +41,12 @@ Usage:
+   no such file: non-existent
+   [2]
+ 
+-Copy in example tests:
++Copy in example tests::
+ 
+   $ cp -R "$TESTDIR"/../examples .
+   $ find . -name '*.err' -exec rm '{}' \;
+ 
+-Run cram examples:
++Run cram examples::
+ 
+   $ cram -q examples examples/fail.t examples/.hidden.t
+   .s.!s.
+@@ -57,7 +57,7 @@ Run cram examples:
+   .*\b114b031c5361553b32d9337a31f39ce5\b.* (re)
+   $ rm examples/fail.t.err
+ 
+-Verbose mode:
++Verbose mode::
+ 
+   $ cram -q -v examples examples/fail.t examples/.hidden.t
+   examples/bare.t: passed
+@@ -73,7 +73,7 @@ Verbose mode:
+   .*\b114b031c5361553b32d9337a31f39ce5\b.* (re)
+   $ rm examples/fail.t.err
+ 
+-Interactive mode (don't merge):
++Interactive mode (don't merge)::
+ 
+   $ cram -n -i examples/fail.t
+   !
+@@ -107,7 +107,7 @@ Interactive mode (don't merge):
+   .*\bec9a94814a64428cd2327580164a01b9\b.* (re)
+   .*\b114b031c5361553b32d9337a31f39ce5\b.* (re)
+ 
+-Interactive mode (merge):
++Interactive mode (merge)::
+ 
+   $ cp examples/fail.t examples/fail.t.orig
+   $ cram -y -i examples/fail.t
+@@ -143,7 +143,7 @@ Interactive mode (merge):
+   .*\b44b27872ea5380df986e19ba23aed934\b.* (re)
+   $ mv examples/fail.t.orig examples/fail.t
+ 
+-Verbose interactive mode (answer manually and don't merge):
++Verbose interactive mode (answer manually and don't merge)::
+ 
+   $ printf 'bad\nn\n' | cram -v -i examples/fail.t
+   examples/fail.t: failed
+@@ -204,7 +204,7 @@ Verbose interactive mode (answer manuall
+   .*\bec9a94814a64428cd2327580164a01b9\b.* (re)
+   .*\b114b031c5361553b32d9337a31f39ce5\b.* (re)
+ 
+-Verbose interactive mode (answer manually and merge):
++Verbose interactive mode (answer manually and merge)::
+ 
+   $ cp examples/fail.t examples/fail.t.orig
+   $ printf 'bad\ny\n' | cram -v -i examples/fail.t
+@@ -239,7 +239,7 @@ Verbose interactive mode (answer manuall
+   .*\b44b27872ea5380df986e19ba23aed934\b.* (re)
+   $ mv examples/fail.t.orig examples/fail.t
+ 
+-Test missing patch(1) and patch(1) error:
++Test missing patch(1) and patch(1) error::
+ 
+   $ PATH=. cram -i examples/fail.t
+   patch(1) required for -i
+@@ -285,7 +285,7 @@ Test missing patch(1) and patch(1) error
+   .*\b114b031c5361553b32d9337a31f39ce5\b.* (re)
+   $ rm patch examples/fail.t.err
+ 
+-Test that a fixed .err file is deleted:
++Test that a fixed .err file is deleted::
+ 
+   $ echo "  $ echo 1" > fixed.t
+   $ cram fixed.t
+@@ -305,10 +305,7 @@ Test that a fixed .err file is deleted:
+   $ test \! -f fixed.t.err
+   $ rm fixed.t
+ 
+-Don't sterilize environment:
+-
+-Note: We can't set the locale to foo because some shells will issue
+-warnings for invalid locales.
++Don't sterilize environment::
+ 
+   $ TZ=foo; export TZ
+   $ CDPATH=foo; export CDPATH
+@@ -340,3 +337,6 @@ warnings for invalid locales.
+   # Ran 1 tests, 0 skipped, 1 failed.
+   [1]
+   $ rm examples/env.t.err
++
++Note: We can't set the locale to foo because some shells will issue
++warnings for invalid locales.
+rst
 runone
 nicer-api
 stdin