Merge pull request #1114 from alanoliveira/main

prevent escape '#' when generating env_file string
This commit is contained in:
Donal McBreen
2024-10-23 12:35:07 +01:00
committed by GitHub
2 changed files with 13 additions and 1 deletions

View File

@@ -11,6 +11,16 @@ class EnvFileTest < ActiveSupport::TestCase
Kamal::EnvFile.new(env).to_s
end
test "to_s won't escape '#'" do
env = {
"foo" => '#$foo',
"bar" => '#{bar}'
}
assert_equal "foo=\#$foo\nbar=\#{bar}\n", \
Kamal::EnvFile.new(env).to_s
end
test "to_str won't escape chinese characters" do
env = {
"foo" => '你好 means hello, "欢迎" means welcome, that\'s simple! 😃 {smile}'