@@ -4,10 +4,10 @@ test! {
44 name: test_os_arch_functions_in_interpolation,
55 justfile: r#"
66foo:
7- echo {{arch()}} {{os()}} {{os_family()}}
7+ echo {{arch()}} {{os()}} {{os_family()}} {{num_cpus()}}
88"# ,
9- stdout: format!( "{} {} {}\n " , target:: arch( ) , target:: os( ) , target:: family( ) ) . as_str( ) ,
10- stderr: format!( "echo {} {} {}\n " , target:: arch( ) , target:: os( ) , target:: family( ) ) . as_str( ) ,
9+ stdout: format!( "{} {} {} {} \n " , target:: arch( ) , target:: os( ) , target:: family( ) , num_cpus :: get ( ) ) . as_str( ) ,
10+ stderr: format!( "echo {} {} {} {} \n " , target:: arch( ) , target:: os( ) , target:: family( ) , num_cpus :: get ( ) ) . as_str( ) ,
1111}
1212
1313test ! {
@@ -16,12 +16,13 @@ test! {
1616a := arch()
1717o := os()
1818f := os_family()
19+ n := num_cpus()
1920
2021foo:
21- echo {{a}} {{o}} {{f}}
22+ echo {{a}} {{o}} {{f}} {{n}}
2223"# ,
23- stdout: format!( "{} {} {}\n " , target:: arch( ) , target:: os( ) , target:: family( ) ) . as_str( ) ,
24- stderr: format!( "echo {} {} {}\n " , target:: arch( ) , target:: os( ) , target:: family( ) ) . as_str( ) ,
24+ stdout: format!( "{} {} {} {} \n " , target:: arch( ) , target:: os( ) , target:: family( ) , num_cpus :: get ( ) ) . as_str( ) ,
25+ stderr: format!( "echo {} {} {} {} \n " , target:: arch( ) , target:: os( ) , target:: family( ) , num_cpus :: get ( ) ) . as_str( ) ,
2526}
2627
2728#[ cfg( not( windows) ) ]
@@ -246,11 +247,11 @@ test! {
246247test ! {
247248 name: test_os_arch_functions_in_default,
248249 justfile: r#"
249- foo a=arch() o=os() f=os_family():
250- echo {{a}} {{o}} {{f}}
250+ foo a=arch() o=os() f=os_family() n=num_cpus() :
251+ echo {{a}} {{o}} {{f}} {{n}}
251252"# ,
252- stdout: format!( "{} {} {}\n " , target:: arch( ) , target:: os( ) , target:: family( ) ) . as_str( ) ,
253- stderr: format!( "echo {} {} {}\n " , target:: arch( ) , target:: os( ) , target:: family( ) ) . as_str( ) ,
253+ stdout: format!( "{} {} {} {} \n " , target:: arch( ) , target:: os( ) , target:: family( ) , num_cpus :: get ( ) ) . as_str( ) ,
254+ stderr: format!( "echo {} {} {} {} \n " , target:: arch( ) , target:: os( ) , target:: family( ) , num_cpus :: get ( ) ) . as_str( ) ,
254255}
255256
256257test ! {
0 commit comments