From dd175c77fe68b1e0ff3dff94d6206bcf7accea4a Mon Sep 17 00:00:00 2001 From: Joao Pedro Henrique Date: Sat, 25 Nov 2023 10:49:14 -0300 Subject: [PATCH] test: Update test case --- bin/src/main.rs | 2 ++ bin/tests/cli.rs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/src/main.rs b/bin/src/main.rs index 85587c6..1743417 100644 --- a/bin/src/main.rs +++ b/bin/src/main.rs @@ -30,6 +30,7 @@ fn main() { "#; let left = r#" public class Main { + void delete(Pessoa pessoa); void create(Pessoa pessoa); public static void main(String[] args) { int x = 0; @@ -40,6 +41,7 @@ fn main() { "#; let right = r#" public class Main { + void upsert(Pessoa pessoa); public static void main(String[] args) { System.out.println("Hello, Paulo!"); int y = 5; diff --git a/bin/tests/cli.rs b/bin/tests/cli.rs index 8cd30fc..98d9199 100644 --- a/bin/tests/cli.rs +++ b/bin/tests/cli.rs @@ -6,6 +6,6 @@ use predicates::prelude::*; #[test] fn it_does_not_crash_and_produces_the_expected_output() { let mut cmd = Command::cargo_bin("generic-merge").unwrap(); - let predicate_fn = predicate::str::contains(" public class Main { void create ( Pessoa pessoa ) ; public static void main ( String [ ] args ) { int x = 0 ; System . out . println ( <<<<<<<<< \"Hello, João!\" ========= \"Hello, Paulo!\" >>>>>>>>> ) ; int y = <<<<<<<<< 3 ========= 5 >>>>>>>>> ; } }"); + let predicate_fn = predicate::str::contains("public class Main { void delete ( Pessoa pessoa ) ; void create ( Pessoa pessoa ) ; public static void main ( String [ ] args ) { int x = 0 ; System . out . println ( <<<<<<<<< \"Hello, João!\" ========= \"Hello, Paulo!\" >>>>>>>>> ) ; int y = <<<<<<<<< 3 ========= 5 >>>>>>>>> ; } void upsert ( Pessoa pessoa ) ; }"); cmd.assert().stdout(predicate_fn); }