aboutsummaryrefslogtreecommitdiff
path: root/test/command/3587.md
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-09-19 12:09:51 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2021-09-21 12:37:42 -0700
commitc266734448544a118ed80e47deaa2590131c7f84 (patch)
treed5793b1dc732456894c96e8ee6829dab9d539388 /test/command/3587.md
parent5f7e7f539a02818d0a94309b15d648d51d1eaee6 (diff)
downloadpandoc-c266734448544a118ed80e47deaa2590131c7f84.tar.gz
Use pretty-simple to format native output.
Previously we used our own homespun formatting. But this produces over-long lines that aren't ideal for diffs in tests. Easier to use something off-the-shelf and standard. Closes #7580. Performance is slower by about a factor of 10, but this isn't really a problem because native isn't suitable as a serialization format. (For serialization you should use json, because the reader is so much faster than native.)
Diffstat (limited to 'test/command/3587.md')
-rw-r--r--test/command/3587.md108
1 files changed, 89 insertions, 19 deletions
diff --git a/test/command/3587.md b/test/command/3587.md
index 3016afa5a..402ad7d9f 100644
--- a/test/command/3587.md
+++ b/test/command/3587.md
@@ -2,14 +2,36 @@
% pandoc -f latex -t native
\SI[round-precision=2]{1}{m} is equal to \SI{1000}{mm}
^D
-[Para [Str "1\160m",Space,Str "is",Space,Str "equal",Space,Str "to",Space,Str "1000\160mm"]]
+[ Para
+ [ Str "1\160m"
+ , Space
+ , Str "is"
+ , Space
+ , Str "equal"
+ , Space
+ , Str "to"
+ , Space
+ , Str "1000\160mm"
+ ]
+]
```
```
% pandoc -f latex -t native
\SI[round-precision=2]{1}[\$]{} is equal to \SI{0.938094}{\euro}
^D
-[Para [Str "$\160\&1",Space,Str "is",Space,Str "equal",Space,Str "to",Space,Str "0.938094\160\8364"]]
+[ Para
+ [ Str "$\160\&1"
+ , Space
+ , Str "is"
+ , Space
+ , Str "equal"
+ , Space
+ , Str "to"
+ , Space
+ , Str "0.938094\160\8364"
+ ]
+]
```
@@ -17,35 +39,35 @@
% pandoc -f latex -t native
\SI{30}{\milli\meter}
^D
-[Para [Str "30\160mm"]]
+[ Para [ Str "30\160mm" ] ]
```
```
% pandoc -f latex -t native
\SI{6}{\gram}
^D
-[Para [Str "6\160g"]]
+[ Para [ Str "6\160g" ] ]
```
```
% pandoc -f latex -t native
\SI{25}{\square\meter}
^D
-[Para [Str "25\160m",Superscript [Str "2"]]]
+[ Para [ Str "25\160m", Superscript [ Str "2" ] ] ]
```
```
% pandoc -f latex -t native
\SI{18.2}{\degreeCelsius}
^D
-[Para [Str "18.2\160\176C"]]
+[ Para [ Str "18.2\160\176C" ] ]
```
```
% pandoc -f latex -t native
\SI{18.2}{\celsius}
^D
-[Para [Str "18.2\160\176C"]]
+[ Para [ Str "18.2\160\176C" ] ]
```
# SIrange tests
@@ -56,19 +78,19 @@
% pandoc -f latex -t native
\SIrange{10}{20}{\gram}
^D
-[Para [Str "10\160g\8211\&20\160g"]]
+[ Para [ Str "10\160g\8211\&20\160g" ] ]
```
```
% pandoc -f latex -t native
\SIrange{35}{9}{\milli\meter}
^D
-[Para [Str "35\160mm\8211\&9\160mm"]]
+[ Para [ Str "35\160mm\8211\&9\160mm" ] ]
```
```
% pandoc -f latex -t native
\SIrange{4}{97367265}{\celsius}
^D
-[Para [Str "4\160\176C\8211\&97367265\160\176C"]]
+[ Para [ Str "4\160\176C\8211\&97367265\160\176C" ] ]
```
## Decimal range with simple units
@@ -77,7 +99,7 @@
% pandoc -f latex -t native
\SIrange{4.5}{97367265.5}{\celsius}
^D
-[Para [Str "4.5\160\176C\8211\&97367265.5\160\176C"]]
+[ Para [ Str "4.5\160\176C\8211\&97367265.5\160\176C" ] ]
```
## Squared, cubed etc. units
@@ -86,21 +108,45 @@
% pandoc -f latex -t native
\SIrange{10}{20}{\square\meter}
^D
-[Para [Str "10\160m",Superscript [Str "2"],Str "\8211\&20\160m",Superscript [Str "2"]]]
+[ Para
+ [ Str "10\160m"
+ , Superscript
+ [ Str "2" ]
+ , Str "\8211\&20\160m"
+ , Superscript
+ [ Str "2" ]
+ ]
+]
```
```
% pandoc -f latex -t native
\SIrange{10}{20}{\cubic\meter}
^D
-[Para [Str "10\160m",Superscript [Str "3"],Str "\8211\&20\160m",Superscript [Str "3"]]]
+[ Para
+ [ Str "10\160m"
+ , Superscript
+ [ Str "3" ]
+ , Str "\8211\&20\160m"
+ , Superscript
+ [ Str "3" ]
+ ]
+]
```
```
% pandoc -f latex -t native
\SIrange{10}{20}{\raisetothe{4}\meter}
^D
-[Para [Str "10\160m",Superscript [Str "4"],Str "\8211\&20\160m",Superscript [Str "4"]]]
+[ Para
+ [ Str "10\160m"
+ , Superscript
+ [ Str "4" ]
+ , Str "\8211\&20\160m"
+ , Superscript
+ [ Str "4" ]
+ ]
+]
```
@@ -108,21 +154,45 @@
% pandoc -f latex -t native
\SIrange{10}{20}{\meter\squared}
^D
-[Para [Str "10\160m",Superscript [Str "2"],Str "\8211\&20\160m",Superscript [Str "2"]]]
+[ Para
+ [ Str "10\160m"
+ , Superscript
+ [ Str "2" ]
+ , Str "\8211\&20\160m"
+ , Superscript
+ [ Str "2" ]
+ ]
+]
```
```
% pandoc -f latex -t native
\SIrange{10}{20}{\meter\cubed}
^D
-[Para [Str "10\160m",Superscript [Str "3"],Str "\8211\&20\160m",Superscript [Str "3"]]]
+[ Para
+ [ Str "10\160m"
+ , Superscript
+ [ Str "3" ]
+ , Str "\8211\&20\160m"
+ , Superscript
+ [ Str "3" ]
+ ]
+]
```
```
% pandoc -f latex -t native
\SIrange{10}{20}{\meter\tothe{4}}
^D
-[Para [Str "10\160m",Superscript [Str "4"],Str "\8211\&20\160m",Superscript [Str "4"]]]
+[ Para
+ [ Str "10\160m"
+ , Superscript
+ [ Str "4" ]
+ , Str "\8211\&20\160m"
+ , Superscript
+ [ Str "4" ]
+ ]
+]
```
@@ -136,12 +206,12 @@
% pandoc -f latex -t native
\SIrange[round-precision=2]{10}{20}{\gram}
^D
-[Para [Str "10\160g\8211\&20\160g"]]
+[ Para [ Str "10\160g\8211\&20\160g" ] ]
```
```
% pandoc -f latex -t native
\SIrange[round-precision=2]{10.0}{20.25}{\gram}
^D
-[Para [Str "10.0\160g\8211\&20.25\160g"]]
+[ Para [ Str "10.0\160g\8211\&20.25\160g" ] ]
```