Fix various test failures
This commit is contained in:
parent
3f417b26b2
commit
22ea33182a
@ -472,7 +472,7 @@ var AllowedShellIntegrationValues = []string{{ {str(sorted(allowed_shell_integra
|
||||
var KittyConfigDefaults = struct {{
|
||||
Term, Shell_integration string
|
||||
}}{{
|
||||
Term: "{Options.term}", Shell_integration: "{Options.shell_integration}",
|
||||
Term: "{Options.term}", Shell_integration: "{' '.join(Options.shell_integration)}",
|
||||
}}
|
||||
''' # }}}
|
||||
|
||||
|
||||
@ -119,7 +119,7 @@ copy --exclude */w.* d1
|
||||
self.ae(len(glob.glob(f'{remote_home}/{tname}/*/xterm-kitty')), 2)
|
||||
|
||||
def test_ssh_env_vars(self):
|
||||
tset = '$A-$(echo no)-`echo no2` !Q5 "something\nelse"'
|
||||
tset = '$A-$(echo no)-`echo no2` !Q5 "something else"'
|
||||
for sh in self.all_possible_sh:
|
||||
with self.subTest(sh=sh), tempfile.TemporaryDirectory() as tdir:
|
||||
os.mkdir(os.path.join(tdir, 'cwd'))
|
||||
|
||||
@ -217,6 +217,13 @@ func serialize_env(cd *connection_data, get_local_env func(string) (string, bool
|
||||
}
|
||||
return nil
|
||||
}
|
||||
add_non_literal_env := func(key, val string, fallback ...string) *EnvInstruction {
|
||||
ans := add_env(key, val, fallback...)
|
||||
if ans != nil {
|
||||
ans.literal_quote = false
|
||||
}
|
||||
return ans
|
||||
}
|
||||
for k, v := range cd.literal_env {
|
||||
add_env(k, v)
|
||||
}
|
||||
@ -230,9 +237,9 @@ func serialize_env(cd *connection_data, get_local_env func(string) (string, bool
|
||||
} else {
|
||||
env = append(env, &EnvInstruction{key: "KITTY_SHELL_INTEGRATION", delete_on_remote: true})
|
||||
}
|
||||
add_env("KITTY_SSH_KITTEN_DATA_DIR", cd.host_opts.Remote_dir)
|
||||
add_env("KITTY_LOGIN_SHELL", cd.host_opts.Login_shell)
|
||||
add_env("KITTY_LOGIN_CWD", cd.host_opts.Cwd)
|
||||
add_non_literal_env("KITTY_SSH_KITTEN_DATA_DIR", cd.host_opts.Remote_dir)
|
||||
add_non_literal_env("KITTY_LOGIN_SHELL", cd.host_opts.Login_shell)
|
||||
add_non_literal_env("KITTY_LOGIN_CWD", cd.host_opts.Cwd)
|
||||
if cd.host_opts.Remote_kitty != Remote_kitty_no {
|
||||
add_env("KITTY_REMOTE", cd.host_opts.Remote_kitty.String())
|
||||
}
|
||||
@ -637,7 +644,7 @@ func test_integration_with_python(args []string) (rc int, err error) {
|
||||
cd := &connection_data{
|
||||
request_id: "testing", remote_args: []string{},
|
||||
username: "testuser", hostname_for_match: "host.test", request_data: true,
|
||||
test_script: args[0],
|
||||
test_script: args[0], echo_on: true,
|
||||
}
|
||||
opts, err := load_config(cd.hostname_for_match, cd.username, nil, f.Name())
|
||||
if err == nil {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user