// Copyright (C) 2025-2026 Daniel Mueller <deso@posteo.net>
// SPDX-License-Identifier: (Apache-2.0 OR MIT)

//! End-to-end tests for [`test-fork`].


#[test_fork::test]
fn trivial() {}

#[test_fork::test]
fn trivial_with_ok() -> Result<(), &'static str> {
    Ok(())
}

/// Test outputting a bunch of data to make sure we don't hit any
/// issues or limits.
#[test_fork::test]
fn output_spam() {
    for _ in 0..100000 {
        println!("test");
    }
}

#[test_fork::test]
#[should_panic]
fn panicking_child() {
    panic!("just testing a panic, nothing to see here")
}

#[test_fork::test]
#[should_panic(expected = "expected message")]
fn panicking_child_with_message() {
    panic!("this is the expected message, in full")
}

#[test_fork::fork]
#[test]
fn fork_attr() {}

#[tokio::test]
#[test_fork::test]
async fn async_test() {}

#[tokio::test]
#[test_fork::fork]
async fn async_test_fork_attr() {}

#[tokio::test]
#[test_fork::test]
#[should_panic]
async fn async_test_panicking() {
    panic!("panic makes the world go 'round")
}
