Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support checking error message for statement & bump to 0.8.0 #102

Merged
merged 5 commits into from
Nov 23, 2022

Conversation

xxchan
Copy link
Member

@xxchan xxchan commented Nov 22, 2022

close #30

Signed-off-by: xxchan <xxchan22f@gmail.com>
Signed-off-by: xxchan <xxchan22f@gmail.com>
Signed-off-by: xxchan <xxchan22f@gmail.com>
Signed-off-by: xxchan <xxchan22f@gmail.com>
Copy link
Member

@wangrunji0408 wangrunji0408 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

match res {
["ok"] => {}
["error", err_str @ ..] => {
let err_str = err_str.join(" ");
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this won't always work, since we do line.split_whitespace(). 😅 But I don't bother fixing it now.

Signed-off-by: xxchan <xxchan22f@gmail.com>
sql: String,
err: Arc<dyn std::error::Error + Send + Sync>,
kind: RecordKind,
},
#[error("{kind} is expected to fail with error:\n\t\x1b[91m{expected_err}\x1b[0m\nbut got error:\n\t\x1b[91m{err}\x1b[0m\n[SQL] {sql}")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be better if this can be controlled by flags, otherwise will mess up people who pipe the output to a file.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed. A similar problem: #104

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix later

@xxchan xxchan merged commit 282a600 into main Nov 23, 2022
@xxchan xxchan deleted the xxchan/confused-starfish branch November 23, 2022 20:30
@fuyufjh fuyufjh mentioned this pull request Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support checking error message
3 participants