fn test_replacement_matches_search()

in src/main.rs [1085:1094]


    fn test_replacement_matches_search() {
        let dir = create_test_files(&[("foo.txt", "foo")]);
        let file_path = dir.path().join("foo.txt");
        let regex = RegexBuilder::new("foo").build().unwrap();
        let mut fm = Fastmod::new(true, false, false);
        fm.present_and_apply_patches(&regex, "foofoo", &file_path, "foo".into())
            .unwrap();
        let contents = read_to_string(file_path).unwrap();
        assert_eq!(contents, "foofoo");
    }