Skip to content

Commit 287734c

Browse files
committed
fix pvl twitter username subst
1 parent 67e3672 commit 287734c

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎go/pvl/hardcoded.go‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ var hardcodedPVLString = `
385385
"assert_regex_match": {
386386
"error": [
387387
"CONTENT_FAILURE",
388-
"Wanted a post of type 'Listing', but got %{kind}"
388+
"Wanted a post of type 'Listing', but got '%{kind}'"
389389
],
390390
"from": "kind",
391391
"pattern": "^Listing$"
@@ -411,7 +411,7 @@ var hardcodedPVLString = `
411411
"assert_regex_match": {
412412
"error": [
413413
"CONTENT_FAILURE",
414-
"Wanted a child of type 't3' but got %{inner_kind}"
414+
"Wanted a child of type 't3' but got '%{inner_kind}'"
415415
],
416416
"from": "inner_kind",
417417
"pattern": "^t3$"
@@ -469,7 +469,7 @@ var hardcodedPVLString = `
469469
"cmp": "cicmp",
470470
"error": [
471471
"BAD_USERNAME",
472-
"Bad post author; wanted '%{username_service} but got '%{author}'"
472+
"Bad post author; wanted '%{username_service}' but got '%{author}'"
473473
]
474474
}
475475
},
@@ -630,7 +630,7 @@ var hardcodedPVLString = `
630630
"cmp": "cicmp",
631631
"error": [
632632
"BAD_USERNAME",
633-
"Bad post authored: wanted ${username_service} but got %{data_screen_name}"
633+
"Bad post authored: wanted '%{username_service}' but got '%{data_screen_name}'"
634634
]
635635
}
636636
},

‎pvl-tools/pvl.cson‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ services:
194194
{ assert_regex_match: {
195195
, pattern: "^Listing$"
196196
, from: "kind"
197-
, error: ["CONTENT_FAILURE", "Wanted a post of type 'Listing', but got %{kind}"] } },
197+
, error: ["CONTENT_FAILURE", "Wanted a post of type 'Listing', but got '%{kind}'"] } },
198198
# check that the inner thing is a t3
199199
{ selector_json: {
200200
, selectors: [0, "data", "children", 0, "kind"]
@@ -203,7 +203,7 @@ services:
203203
{ assert_regex_match: {
204204
, pattern: "^t3$"
205205
, from: "inner_kind"
206-
, error: ["CONTENT_FAILURE", "Wanted a child of type 't3' but got %{inner_kind}"] } },
206+
, error: ["CONTENT_FAILURE", "Wanted a child of type 't3' but got '%{inner_kind}'"] } },
207207
# check the subreddit
208208
{ selector_json: {
209209
, selectors: [0, "data", "children", 0, "data", "subreddit"]
@@ -223,7 +223,7 @@ services:
223223
, cmp: "cicmp"
224224
, a: "author"
225225
, b: "username_service"
226-
, error: ["BAD_USERNAME", "Bad post author; wanted '%{username_service} but got '%{author}'"] } },
226+
, error: ["BAD_USERNAME", "Bad post author; wanted '%{username_service}' but got '%{author}'"] } },
227227
# check the title
228228
{ selector_json: {
229229
, selectors: [0, "data", "children", 0, "data", "title"]
@@ -297,7 +297,7 @@ services:
297297
, cmp: "cicmp"
298298
, a: "data_screen_name"
299299
, b: "username_service"
300-
, error: ["BAD_USERNAME", "Bad post authored: wanted ${username_service} but got %{data_screen_name}"] } },
300+
, error: ["BAD_USERNAME", "Bad post authored: wanted '%{username_service}' but got '%{data_screen_name}'"] } },
301301
# Check the username in the tweet. Case insensitive.
302302
{ selector_css: {
303303
, selectors: ["div.permalink-tweet-container div.permalink-tweet", 0, "p.tweet-text", 0]

0 commit comments

Comments
 (0)