Implement Rust CLI tests (#372)

# Description

Closes #365 

Ports all `resolc` CLI tests to Rust and removes the CLI TypeScript
tests.
This commit is contained in:
LJ authored and GitHub committed 2025-08-19 16:04:05 +02:00
1 parent ea0ea711ad
commit 2f89c743ce
31 files changed
+591 -7870

No files matched your search

@@ -0,0 +1,24 @@
//! The tests for running resolc with standard JSON option.
#![cfg(test)]
use crate::tests::cli::utils;
const JSON_OPTION: &str = "--standard-json";
#[test]
fn runs_with_valid_input_file() {
let arguments = &[JSON_OPTION];
let resolc_result =
utils::execute_resolc_with_stdin_input(arguments, utils::STANDARD_JSON_CONTRACTS_PATH);
utils::assert_command_success(&resolc_result, "Providing a valid input file to stdin");
assert!(
resolc_result.stdout.contains("contracts"),
"Expected the output to contain a `contracts` field."
);
let solc_result =
utils::execute_solc_with_stdin_input(arguments, utils::STANDARD_JSON_CONTRACTS_PATH);
utils::assert_equal_exit_codes(&solc_result, &resolc_result);
}