+test_preferences = (
+ (0, "> ", "preferences"),
+ (0, r"prompt \x1b\[32m.*> ", "preferences prompt #"),
+ (0, r"# ", "preferences prompt"),
+ (0, r"#.*# ", "preferences prompt >"),
+ (2, "> ", "preferences loglevel 0"),
+ (2, "> ", "preferences"),
+ (2, r"loglevel \x1b\[32m0\x1b\[0m.*> ", "preferences loglevel zero"),
+ (2, r'''cannot be set to type "<class 'str'>"\..*> ''', ""),
+)
+
+test_crlf_eol = (
+ # Send a CR+LF at the end of the line instead of the default CR+NUL,
+ # to make sure they're treated the same
+ (2, "> ", b"say I use CR+LF as my EOL, not CR+NUL.\r\n"),
+ (2, r'You say, "I use CR\+LF as my EOL, not CR\+NUL\.".*> ', ""),
+)
+