From 8bbdd403e1164c857e38400866f7ce415024173e Mon Sep 17 00:00:00 2001 From: Stefan Heule Date: Mon, 2 Sep 2024 14:49:56 -0700 Subject: [PATCH] fix --- src/tests/mod.rs | 1 - src/tests/test_piranha_python.rs | 9 ++++++--- src/tests/test_piranha_ruby.rs | 32 -------------------------------- 3 files changed, 6 insertions(+), 36 deletions(-) delete mode 100644 src/tests/test_piranha_ruby.rs diff --git a/src/tests/mod.rs b/src/tests/mod.rs index 09799cca2..8554f3c4e 100644 --- a/src/tests/mod.rs +++ b/src/tests/mod.rs @@ -37,7 +37,6 @@ mod test_piranha_scala; mod test_piranha_thrift; -mod test_piranha_ruby; mod test_piranha_scm; mod test_piranha_strings; mod test_piranha_yaml; diff --git a/src/tests/test_piranha_python.rs b/src/tests/test_piranha_python.rs index fcb8fd12d..8ab288ff8 100644 --- a/src/tests/test_piranha_python.rs +++ b/src/tests/test_piranha_python.rs @@ -34,10 +34,13 @@ fn test_delete_modify_str_literal_from_list_via_cli() { let mut cmd = Command::cargo_bin("polyglot_piranha").unwrap(); cmd - .args(["-c", "test-resources/py/delete_cleanup_str_in_list/input"]) + .args([ + "-c", + "test-resources/python/delete_cleanup_str_in_list/input", + ]) .args([ "-f", - "test-resources/py/delete_cleanup_str_in_list/configurations", + "test-resources/python/delete_cleanup_str_in_list/configurations", ]) .args(["-l", "python"]) .args(["-j", temp_file.to_str().unwrap()]) @@ -50,7 +53,7 @@ fn test_delete_modify_str_literal_from_list_via_cli() { let content = read_file(&temp_file).unwrap(); let output: Vec = serde_json::from_str(&content).unwrap(); let expected_path = - Path::new("test-resources/py/delete_cleanup_str_in_list/expected/only_lists.py"); + Path::new("test-resources/python/delete_cleanup_str_in_list/expected/only_lists.py"); let expected = read_file(&expected_path.to_path_buf()).unwrap(); assert!(eq_without_whitespace(output[0].content(), &expected)); diff --git a/src/tests/test_piranha_ruby.rs b/src/tests/test_piranha_ruby.rs deleted file mode 100644 index 0966bcbc2..000000000 --- a/src/tests/test_piranha_ruby.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - Copyright (c) 2023 Uber Technologies, Inc. - -

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file - except in compliance with the License. You may obtain a copy of the License at -

http://www.apache.org/licenses/LICENSE-2.0 - -

Unless required by applicable law or agreed to in writing, software distributed under the - License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - express or implied. See the License for the specific language governing permissions and - limitations under the License. -*/ - -use crate::models::default_configs::RUBY; - -use super::create_rewrite_tests; - -create_rewrite_tests! { - RUBY, - test_replace_empty_if_unless_statement: "replace_empty_if_or_unless_statement", 1; - test_replace_ternary_operator: "replace_ternary_operator", 1; - test_replace_if_statement: "replace_if_statement", 3; - test_replace_unless_statement: "replace_unless_statement", 3; - test_boolean_cleanup: "simplify_boolean_expressions", 1; - test_simplify_rspec_block_expressions: "simplify_rspec_block_expressions", 1; - test_simplify_if_lambda_conditional_statements: "simplify_if_lambda_conditional_statements", 1; - test_simplify_unless_lambda_conditional_statements: "simplify_unless_lambda_conditional_statements", 1; - test_simplify_if_proc_conditional_statements: "simplify_if_proc_conditional_statements", 1; - test_simplify_unless_proc_conditional_statements: "simplify_if_proc_conditional_statements", 1; - test_delete_lines_after_return: "delete_lines_after_return", 1; - simplify_variable_assigned_flag_check: "simplify_variable_assigned_flag_check", 1; -}