Skip to content

Commit 7d54e73

Browse files
committed
Use serial for env var tests
1 parent e8fdc51 commit 7d54e73

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

crates/goose-cli/src/session/input.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,7 @@ Up/Down arrows - Navigate through command history"
340340
#[cfg(test)]
341341
mod tests {
342342
use super::*;
343+
use serial_test::serial;
343344

344345
#[test]
345346
fn test_handle_slash_command() {
@@ -603,13 +604,15 @@ mod tests {
603604
}
604605

605606
#[test]
607+
#[serial]
606608
fn test_get_newline_key_default() {
607609
// Clear the env var to test default behavior
608610
std::env::remove_var("GOOSE_CLI_NEWLINE_KEY");
609611
assert_eq!(get_newline_key(), 'j');
610612
}
611613

612614
#[test]
615+
#[serial]
613616
fn test_get_newline_key_custom() {
614617
// Test setting a custom key
615618
std::env::set_var("GOOSE_CLI_NEWLINE_KEY", "o");
@@ -624,6 +627,7 @@ mod tests {
624627
}
625628

626629
#[test]
630+
#[serial]
627631
fn test_get_newline_key_empty_string() {
628632
// Test empty string falls back to default
629633
std::env::set_var("GOOSE_CLI_NEWLINE_KEY", "");
@@ -634,6 +638,7 @@ mod tests {
634638
}
635639

636640
#[test]
641+
#[serial]
637642
fn test_get_newline_key_first_char_only() {
638643
// Test only first character is used
639644
std::env::set_var("GOOSE_CLI_NEWLINE_KEY", "abc");

0 commit comments

Comments
 (0)