just 1.51.0

🤖 Just a command runner
Documentation
use super::*;

#[test]
fn bugfix() {
  let mut justfile = String::from("foo: (x ");
  for _ in 0..500 {
    justfile.push('(');
  }
  Test::new()
    .justfile(&justfile)
    .stderr(RECURSION_LIMIT_REACHED)
    .failure();
}

#[test]
fn user_defined_function_recursion_limit() {
  Test::new()
    .justfile(
      "
        set unstable

        foo() := foo()

        bar:
          echo {{foo()}}
      ",
    )
    .stderr(format!(
      "error: maximum recursion depth of {} exceeded while calling function foo\n",
      if cfg!(windows) { 48 } else { 256 },
    ))
    .failure();
}

const RECURSION_LIMIT_REACHED: &str = if cfg!(windows) {
  "
error: parsing recursion depth exceeded
 ——▶ justfile:1:57
  │
1 │ foo: (x ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
  │                                                         ^
"
} else {
  "
error: parsing recursion depth exceeded
 ——▶ justfile:1:265
  │
1 │ foo: (x ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
  │                                                                                                                                                                                                                                                                         ^
"
};