String.Format doesn't handle string with escaped characters properly. There are some pending specs committed demonstrating the problems, namely
|
it "with args with escaped characters" do |
|
pending "better handling of escaped characters in the template" |
|
|
|
result = described_class.value("States.Format('This value is {}', '\\'')") |
|
expect(result).to eq("This value is \\'") |
|
end |
|
it "fails with invalid templates" do |
|
pending "better handling of escaped characters in the template" |
|
|
|
expect { described_class.value("States.Format('\\{}')") }.to raise_error(ArgumentError, "Invalid template in States.Format (matching '{' not found for '}')") |
|
expect { described_class.value("States.Format('{\\}')") }.to raise_error(ArgumentError, "Invalid template in States.Format (matching '}' not found for '{')") |
|
end |
String.Format doesn't handle string with escaped characters properly. There are some pending specs committed demonstrating the problems, namely
floe/spec/workflow/intrinsic_function_spec.rb
Lines 59 to 64 in a2bd4ee
floe/spec/workflow/intrinsic_function_spec.rb
Lines 81 to 86 in a2bd4ee