diff options
author | Vincent Ambo <mail@tazj.in> | 2020-07-19T14·57+0100 |
---|---|---|
committer | tazjin <mail@tazj.in> | 2020-07-19T16·33+0000 |
commit | 61a7b97c3927f28ef588196bc2efbd8c6cceb8c4 (patch) | |
tree | e1d5e5c273f1c0fcfce9df4044c346abf78ba59e /third_party/nix/src/tests/lang/eval-okay-xml.exp | |
parent | 97e649922542ef66c9d80cb1b41817ed07c2c5a6 (diff) |
test(3p/nix): Enable output comparison for evaluator success tests r/1398
Enables loading of the expected output of evaluator tests from the corresponding .exp files, and checks that the output matches. This again leaves some tests behind in the disabled folder, but we now have almost the entire suite up and running so I can get around to cleaning up the disabled ones. Other note: Some tests had XML output, despite not being related to XML testing at all - I'm not sure why they chose to do this, but have converted those test outputs to normal Nix instead. We have a separate test suite for JSON & XML serialisation already, which was contributed by andi-. Change-Id: Id7c42c836edfec4c22db9d893e35489f3e6dd559 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1285 Tested-by: BuildkiteCI Reviewed-by: isomer <isomer@tvl.fyi> Reviewed-by: glittershark <grfn@gws.fyi>
Diffstat (limited to 'third_party/nix/src/tests/lang/eval-okay-xml.exp')
-rw-r--r-- | third_party/nix/src/tests/lang/eval-okay-xml.exp | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/third_party/nix/src/tests/lang/eval-okay-xml.exp b/third_party/nix/src/tests/lang/eval-okay-xml.exp new file mode 100644 index 000000000000..92b75e0b8b17 --- /dev/null +++ b/third_party/nix/src/tests/lang/eval-okay-xml.exp @@ -0,0 +1,52 @@ +<?xml version='1.0' encoding='utf-8'?> +<expr> + <attrs> + <attr name="a"> + <string value="foo" /> + </attr> + <attr name="at"> + <function> + <attrspat name="args"> + <attr name="x" /> + <attr name="y" /> + <attr name="z" /> + </attrspat> + </function> + </attr> + <attr name="b"> + <string value="bar" /> + </attr> + <attr name="c"> + <string value="foobar" /> + </attr> + <attr name="ellipsis"> + <function> + <attrspat ellipsis="1"> + <attr name="x" /> + <attr name="y" /> + <attr name="z" /> + </attrspat> + </function> + </attr> + <attr name="f"> + <function> + <attrspat> + <attr name="z" /> + <attr name="x" /> + <attr name="y" /> + </attrspat> + </function> + </attr> + <attr name="id"> + <function> + <varpat name="x" /> + </function> + </attr> + <attr name="x"> + <int value="123" /> + </attr> + <attr name="y"> + <float value="567.89" /> + </attr> + </attrs> +</expr> |