about summary refs log tree commit diff
path: root/src/test/pretty/example2.rs
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2011-08-01 14:10:59 -0700
committerBrian Anderson <banderson@mozilla.com>2011-08-02 10:39:13 -0700
commit0fbb6782bbdbe8d3bd703ca46110c989aec3e2ff (patch)
treee8658c0147ae9734bf6b963b76eedffc7990d365 /src/test/pretty/example2.rs
parenteea888af253083d658319382352181df7f255c03 (diff)
downloadrust-0fbb6782bbdbe8d3bd703ca46110c989aec3e2ff.tar.gz
rust-0fbb6782bbdbe8d3bd703ca46110c989aec3e2ff.zip
Add dedicated pretty-printer tests with new pp-exact directive
Add a new src/test/pretty directory to hold just source files for testing the
pretty-printer.

Add a new pp-exact directive. When this directive is followed by a file name
it specifies a file containing the output that the pretty-printer should
generate. When pp-exact is not followed by a filename it says that the file
should pretty-print as written.
Diffstat (limited to 'src/test/pretty/example2.rs')
-rw-r--r--src/test/pretty/example2.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/pretty/example2.rs b/src/test/pretty/example2.rs
new file mode 100644
index 00000000000..3f3e99a49a8
--- /dev/null
+++ b/src/test/pretty/example2.rs
@@ -0,0 +1,7 @@
+// pp-exact:example2.pp
+
+fn
+main
+()
+{
+}
\ No newline at end of file