mirror of
https://github.com/storytold/figcraft.git
synced 2026-11-14 06:12:28 +00:00
CLI: test that plain escapes controls only
This commit is contained in:
1 parent
680ec56c89
commit
8802f3fd49
1 file changed
+6
@@ -505,6 +505,12 @@ pub fn connect_publish(file: &str, mappings: &str, dry_run: bool) -> CliResult<E
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn plain_escapes_controls_and_leaves_quotes_and_paths() {
|
||||
assert_eq!(plain("a\u{1b}[31m\nb"), r"a\u{1b}[31m\nb");
|
||||
assert_eq!(plain(r"Bob's C:\files"), r"Bob's C:\files");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn script_formats() {
|
||||
assert_eq!(parse_script(r#"[{"command":"a"},{"command":"b","params":{"x":1}}]"#).unwrap().len(), 2);
|
||||
|
||||
Reference in new issue
Block a user