11use super :: * ;
22
3- #[ test]
4- fn unstable_not_passed ( ) {
5- Test :: new ( )
6- . arg ( "--fmt" )
7- . justfile ( "" )
8- . stderr_regex ( "error: The `--fmt` command is currently unstable..*" )
9- . failure ( ) ;
10- }
11-
123#[ test]
134fn check_without_fmt ( ) {
145 Test :: new ( )
@@ -25,7 +16,6 @@ fn check_without_fmt() {
2516#[ test]
2617fn check_ok ( ) {
2718 Test :: new ( )
28- . arg ( "--unstable" )
2919 . arg ( "--fmt" )
3020 . arg ( "--check" )
3121 . justfile (
@@ -50,7 +40,6 @@ fn check_ok() {
5040#[ test]
5141fn check_found_diff ( ) {
5242 Test :: new ( )
53- . arg ( "--unstable" )
5443 . arg ( "--fmt" )
5544 . arg ( "--check" )
5645 . justfile ( "x:=``\n " )
@@ -71,7 +60,6 @@ fn check_found_diff() {
7160#[ test]
7261fn check_found_diff_quiet ( ) {
7362 Test :: new ( )
74- . arg ( "--unstable" )
7563 . arg ( "--fmt" )
7664 . arg ( "--check" )
7765 . arg ( "--quiet" )
@@ -83,7 +71,6 @@ fn check_found_diff_quiet() {
8371fn check_diff_color ( ) {
8472 Test :: new ( )
8573 . justfile ( "x:=``\n " )
86- . arg ( "--unstable" )
8774 . arg ( "--fmt" )
8875 . arg ( "--check" )
8976 . arg ( "--color" )
@@ -93,30 +80,6 @@ fn check_diff_color() {
9380 . failure ( ) ;
9481}
9582
96- #[ test]
97- fn unstable_passed ( ) {
98- let tmp = tempdir ( ) ;
99-
100- let justfile = tmp. path ( ) . join ( "justfile" ) ;
101-
102- fs:: write ( & justfile, "x := 'hello' " ) . unwrap ( ) ;
103-
104- let output = Command :: new ( JUST )
105- . current_dir ( tmp. path ( ) )
106- . arg ( "--fmt" )
107- . arg ( "--unstable" )
108- . output ( )
109- . unwrap ( ) ;
110-
111- if !output. status . success ( ) {
112- eprintln ! ( "{}" , String :: from_utf8_lossy( & output. stderr) ) ;
113- eprintln ! ( "{}" , String :: from_utf8_lossy( & output. stdout) ) ;
114- panic ! ( "justfile failed with status: {}" , output. status) ;
115- }
116-
117- assert_eq ! ( fs:: read_to_string( & justfile) . unwrap( ) , "x := 'hello'\n " ) ;
118- }
119-
12083#[ test]
12184fn write_error ( ) {
12285 // skip this test if running as root, since root can write files even if
@@ -132,7 +95,7 @@ fn write_error() {
13295
13396 let test = Test :: with_tempdir ( tempdir)
13497 . no_justfile ( )
135- . args ( [ "--fmt" , "--unstable" ] )
98+ . arg ( "--fmt" )
13699 . stderr_regex ( if cfg ! ( windows) {
137100 r"error: Failed to write justfile to `.*`: Access is denied. \(os error 5\)\n"
138101 } else {
@@ -1438,17 +1401,13 @@ fn multi_argument_attribute() {
14381401 Test :: new ( )
14391402 . justfile (
14401403 "
1441- set unstable
1442-
14431404 [script('a', 'b', 'c')]
14441405 foo:
14451406 " ,
14461407 )
14471408 . arg ( "--dump" )
14481409 . stdout (
14491410 "
1450- set unstable
1451-
14521411 [script('a', 'b', 'c')]
14531412 foo:
14541413 " ,
@@ -1461,8 +1420,6 @@ fn doc_attribute_suppresses_comment() {
14611420 Test :: new ( )
14621421 . justfile (
14631422 "
1464- set unstable
1465-
14661423 # COMMENT
14671424 [doc('ATTRIBUTE')]
14681425 foo:
@@ -1471,8 +1428,6 @@ fn doc_attribute_suppresses_comment() {
14711428 . arg ( "--dump" )
14721429 . stdout (
14731430 "
1474- set unstable
1475-
14761431 # COMMENT
14771432 [doc('ATTRIBUTE')]
14781433 foo:
@@ -1493,10 +1448,7 @@ fn unchanged_justfiles_are_not_written_to_disk() {
14931448 permissions. set_readonly ( true ) ;
14941449 fs:: set_permissions ( & justfile, permissions) . unwrap ( ) ;
14951450
1496- Test :: with_tempdir ( tmp)
1497- . no_justfile ( )
1498- . args ( [ "--fmt" , "--unstable" ] )
1499- . success ( ) ;
1451+ Test :: with_tempdir ( tmp) . no_justfile ( ) . arg ( "--fmt" ) . success ( ) ;
15001452}
15011453
15021454#[ test]
@@ -1656,7 +1608,7 @@ fn arg_attribute_help() {
16561608#[ test]
16571609fn missing_import_file ( ) {
16581610 Test :: new ( )
1659- . args ( [ "--unstable" , "-- fmt", "--check" ] )
1611+ . args ( [ "--fmt" , "--check" ] )
16601612 . justfile ( "import 'foo'\n " )
16611613 . test_round_trip ( false )
16621614 . success ( ) ;
@@ -1665,7 +1617,7 @@ fn missing_import_file() {
16651617#[ test]
16661618fn missing_module_file ( ) {
16671619 Test :: new ( )
1668- . args ( [ "--unstable" , "-- fmt", "--check" ] )
1620+ . args ( [ "--fmt" , "--check" ] )
16691621 . justfile ( "mod foo\n " )
16701622 . test_round_trip ( false )
16711623 . success ( ) ;
@@ -1674,7 +1626,7 @@ fn missing_module_file() {
16741626#[ test]
16751627fn undefined_variable ( ) {
16761628 Test :: new ( )
1677- . args ( [ "--unstable" , "-- fmt", "--check" ] )
1629+ . args ( [ "--fmt" , "--check" ] )
16781630 . justfile (
16791631 "
16801632 foo:
@@ -1688,7 +1640,7 @@ fn undefined_variable() {
16881640#[ test]
16891641fn indentation_two_spaces ( ) {
16901642 Test :: new ( )
1691- . args ( [ "--unstable" , "-- fmt", "--check" , "--indentation" , " " ] )
1643+ . args ( [ "--fmt" , "--check" , "--indentation" , " " ] )
16921644 . justfile ( "foo:\n echo bar\n " )
16931645 . test_round_trip ( false )
16941646 . success ( ) ;
@@ -1697,7 +1649,7 @@ fn indentation_two_spaces() {
16971649#[ test]
16981650fn indentation_tab ( ) {
16991651 Test :: new ( )
1700- . args ( [ "--unstable" , "-- fmt", "--check" , "--indentation" , "\t " ] )
1652+ . args ( [ "--fmt" , "--check" , "--indentation" , "\t " ] )
17011653 . justfile ( "foo:\n \t echo bar\n " )
17021654 . test_round_trip ( false )
17031655 . success ( ) ;
@@ -1706,7 +1658,7 @@ fn indentation_tab() {
17061658#[ test]
17071659fn indentation_check_with_custom ( ) {
17081660 Test :: new ( )
1709- . args ( [ "--unstable" , "-- fmt", "--check" , "--indentation" , " " ] )
1661+ . args ( [ "--fmt" , "--check" , "--indentation" , " " ] )
17101662 . justfile ( "foo:\n echo bar\n " )
17111663 . test_round_trip ( false )
17121664 . stdout ( " foo:\n - echo bar\n + echo bar\n " )
0 commit comments