mirror of
https://github.com/NixOS/nix
synced 2025-07-07 18:31:49 +02:00
C API: Add nix_clear_err
This commit is contained in:
parent
afdd12be5e
commit
2dc7598779
3 changed files with 35 additions and 3 deletions
|
@ -31,6 +31,9 @@ TEST_F(nix_api_util_context, nix_context_error)
|
|||
}
|
||||
ASSERT_EQ(ctx->last_err_code, NIX_ERR_UNKNOWN);
|
||||
ASSERT_EQ(*ctx->last_err, err_msg_ref);
|
||||
|
||||
nix_clear_err(ctx);
|
||||
ASSERT_EQ(ctx->last_err_code, NIX_OK);
|
||||
}
|
||||
|
||||
TEST_F(nix_api_util_context, nix_set_err_msg)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue