Skip to content

Commit

Permalink
Added tests for single vs double quote
Browse files Browse the repository at this point in the history
Signed-off-by: Athish Pranav D <[email protected]>
  • Loading branch information
Athishpranav2003 committed Aug 9, 2024
1 parent 2851b99 commit af2b11d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/config/test_literal_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,9 @@ def test_falseX
assert_text_parsed_as('{"a":"foo1"}', '{"a":"foo#{worker_id}"}')
ENV.delete('SERVERENGINE_WORKER_ID')
}
test('no quote') { assert_text_parsed_as_json({'a'=>'b','c'=>'test'}, '{"a":"b","c":"#{v1}"}') }
test('single quote') { assert_text_parsed_as_json({'a'=>'b','c'=>'#{v1}'}, '\'{"a":"b","c":"#{v1}"}\'') }
test('double quote') { assert_text_parsed_as_json({'a'=>'b','c'=>'test'}, '"{\"a\":\"b\",\"c\":\"#{v1}\"}"') }
json_hash_with_comment = <<EOH
{
"a": 1, # this is a
Expand Down

0 comments on commit af2b11d

Please sign in to comment.