about summary refs log tree commit diff
path: root/tvix/eval/src/tests/tvix_tests/eval-okay-escapify-integer-keys.exp
diff options
context:
space:
mode:
authorAdam Joseph <adam@westernsemico.com>2022-10-25T08·56-0700
committerclbot <clbot@tvl.fyi>2022-11-04T01·42+0000
commit4ec43bed5e1f6077402301aeee125870f755267b (patch)
treeae865efb7c87bdd4705f65f278c4d98212e8d3b8 /tvix/eval/src/tests/tvix_tests/eval-okay-escapify-integer-keys.exp
parentd8841376e733e53af234bd924d7841c34d9b0c61 (diff)
fix(tvix/eval): quote keys which are not valid identifiers r/5241
The impl Display for NixAttrs needs to wrap double quotes around any
keys which are not valid Nix identifiers.  This commit does that,
and adds a test (which fails prior to this commit and passes after
this commit).

Change-Id: Ie31ce91e8637cb27073f23f115db81feefdc6424
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7084
Autosubmit: Adam Joseph <adam@westernsemico.com>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/tests/tvix_tests/eval-okay-escapify-integer-keys.exp')
-rw-r--r--tvix/eval/src/tests/tvix_tests/eval-okay-escapify-integer-keys.exp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-escapify-integer-keys.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-escapify-integer-keys.exp
new file mode 100644
index 000000000000..aa98a082a8ac
--- /dev/null
+++ b/tvix/eval/src/tests/tvix_tests/eval-okay-escapify-integer-keys.exp
@@ -0,0 +1 @@
+{ "3" = 3; }