Skip to content

Commit c292727

Browse files
committed
Merge pull request #194 from sparkprime/fix_format_percent
Fix format percent
2 parents 0c234fe + eecd82e commit c292727

8 files changed

+30
-24
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
RUNTIME ERROR: Cannot test equality of functions
2-
std.jsonnet:982:17-41 function <anonymous>
2+
std.jsonnet:987:17-41 function <anonymous>
33
error.equality_function.jsonnet:17:1-32
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
RUNTIME ERROR: foobar
22
error.inside_equals_array.jsonnet:18:18-31 thunk <array_element>
3-
std.jsonnet:962:41-44 thunk <b>
4-
std.jsonnet:962:33-44 function <anonymous>
5-
std.jsonnet:962:33-44 function <aux>
6-
std.jsonnet:965:29-44 function <anonymous>
7-
std.jsonnet:966:21-32
3+
std.jsonnet:967:41-44 thunk <b>
4+
std.jsonnet:967:33-44 function <anonymous>
5+
std.jsonnet:967:33-44 function <aux>
6+
std.jsonnet:970:29-44 function <anonymous>
7+
std.jsonnet:971:21-32
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
RUNTIME ERROR: foobar
22
error.inside_equals_object.jsonnet:18:22-35 object <b>
3-
std.jsonnet:976:62-65 thunk <b>
4-
std.jsonnet:976:54-65 function <anonymous>
5-
std.jsonnet:976:54-65 function <aux>
6-
std.jsonnet:979:29-44 function <anonymous>
7-
std.jsonnet:980:21-32
3+
std.jsonnet:981:62-65 thunk <b>
4+
std.jsonnet:981:54-65 function <anonymous>
5+
std.jsonnet:981:54-65 function <aux>
6+
std.jsonnet:984:29-44 function <anonymous>
7+
std.jsonnet:985:21-32
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
RUNTIME ERROR: Object assertion failed.
22
error.invariant.equality.jsonnet:17:10-14 thunk <object_assert>
3-
std.jsonnet:976:54-57 thunk <a>
4-
std.jsonnet:976:54-65 function <anonymous>
5-
std.jsonnet:976:54-65 function <anonymous>
6-
std.jsonnet:980:21-32
3+
std.jsonnet:981:54-57 thunk <a>
4+
std.jsonnet:981:54-65 function <anonymous>
5+
std.jsonnet:981:54-65 function <anonymous>
6+
std.jsonnet:985:21-32
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
RUNTIME ERROR: Object assertion failed.
22
error.obj_assert.fail1.jsonnet:20:23-28 thunk <object_assert>
3-
std.jsonnet:976:54-57 thunk <a>
4-
std.jsonnet:976:54-65 function <anonymous>
5-
std.jsonnet:976:54-65 function <anonymous>
6-
std.jsonnet:980:21-32
3+
std.jsonnet:981:54-57 thunk <a>
4+
std.jsonnet:981:54-65 function <anonymous>
5+
std.jsonnet:981:54-65 function <anonymous>
6+
std.jsonnet:985:21-32
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
RUNTIME ERROR: foo was not equal to bar
22
error.obj_assert.fail2.jsonnet:20:32-64 thunk <object_assert>
3-
std.jsonnet:976:54-57 thunk <a>
4-
std.jsonnet:976:54-65 function <anonymous>
5-
std.jsonnet:976:54-65 function <anonymous>
6-
std.jsonnet:980:21-32
3+
std.jsonnet:981:54-57 thunk <a>
4+
std.jsonnet:981:54-65 function <anonymous>
5+
std.jsonnet:981:54-65 function <anonymous>
6+
std.jsonnet:985:21-32
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
RUNTIME ERROR: Assertion failed. 1 != 2
2-
std.jsonnet:630:13-55 function <anonymous>
2+
std.jsonnet:635:13-55 function <anonymous>
33
error.sanity.jsonnet:17:1-21

test_suite/format.jsonnet

+6
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ std.assertEqual(std.format("%#%", []), "%") &&
2121
std.assertEqual(std.format("%# +05.3%", []), " %") &&
2222
std.assertEqual(std.format("%# -+05.3%", []), "% ") &&
2323

24+
// %
25+
std.assertEqual(std.format("%%", []), "%") &&
26+
std.assertEqual(std.format("%%%%", []), "%%") &&
27+
std.assertEqual(std.format("%s%%", ["foo"]), "foo%") &&
28+
std.assertEqual(std.format("%%%s", ["foo"]), "%foo") &&
29+
2430
// s
2531
std.assertEqual(std.format("%s", ["test"]), "test") &&
2632
std.assertEqual(std.format("%s", [true]), "true") &&

0 commit comments

Comments
 (0)