Skip to content

Commit b8a5098

Browse files
undo stuff
1 parent a301aba commit b8a5098

File tree

5 files changed

+10
-56
lines changed

5 files changed

+10
-56
lines changed

crates/pglt_analyser/tests/rules_tests.rs

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,6 @@ pglt_test_macros::gen_tests! {
1111
crate::rule_test
1212
}
1313

14-
mod testibear {
15-
pglt_test_macros::gen_tests! {
16-
"tests/specs/**/*.sql",
17-
crate::printer
18-
}
19-
}
20-
21-
fn printer(fp: &'static str, expected: &str, dir: &str) {
22-
println!("{fp}\n{expected}\n{dir}");
23-
}
24-
2514
fn rule_test(full_path: &'static str, _: &str, _: &str) {
2615
let input_file = Path::new(full_path);
2716

@@ -45,15 +34,15 @@ fn rule_test(full_path: &'static str, _: &str, _: &str) {
4534

4635
let results = analyser.run(AnalyserContext { root: &ast });
4736

48-
// let mut snapshot = String::new();
49-
// write_snapshot(&mut snapshot, query.as_str(), results.as_slice());
37+
let mut snapshot = String::new();
38+
write_snapshot(&mut snapshot, query.as_str(), results.as_slice());
5039

51-
// insta::with_settings!({
52-
// prepend_module_to_snapshot => false,
53-
// snapshot_path => input_file.parent().unwrap(),
54-
// }, {
55-
// insta::assert_snapshot!(fname, snapshot);
56-
// });
40+
insta::with_settings!({
41+
prepend_module_to_snapshot => false,
42+
snapshot_path => input_file.parent().unwrap(),
43+
}, {
44+
insta::assert_snapshot!(fname, snapshot);
45+
});
5746

5847
let expectation = Expectation::from_file(&query);
5948
expectation.assert(results.as_slice());

crates/pglt_analyser/tests/specs/safety/banDropColumn/basic.sql.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ expression: snapshot
44
---
55
# Input
66
```
7+
-- expect_only_lint/safety/banDropColumn
78
alter table test
89
drop column id;
910
```

crates/pglt_analyser/tests/specs/safety/banDropColumn/basic.sql.snap.new

Lines changed: 0 additions & 18 deletions
This file was deleted.

crates/pglt_analyser/tests/specs/safety/banDropNotNull/basic.sql.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ expression: snapshot
44
---
55
# Input
66
```
7+
-- expect_only_lint/safety/banDropNotNull
78
alter table users
89
alter column id
910
drop not null;

crates/pglt_analyser/tests/specs/safety/banDropNotNull/basic.sql.snap.new

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)