MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / shell_quote_with_single_quote

Function shell_quote_with_single_quote

atomic-cli/src/commands/update.rs:946–953  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

944
945 #[test]
946 fn shell_quote_with_single_quote() {
947 // The tricky case: end the single-quoted run, escape the quote, restart.
948 // Per POSIX: 'a'\''b' parses as the single string a'b
949 assert_eq!(
950 shell_quote("/opt/atomic user's/bin"),
951 "'/opt/atomic user'\\''s/bin'"
952 );
953 }
954
955 #[test]
956 fn upgrade_message_path_with_single_quote_renders_safely() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected