mirror of
https://github.com/NixOS/nix
synced 2025-07-07 10:11:47 +02:00
C API: if store doesn't have a version, return an empty string
This commit is contained in:
parent
dfdb90dc8e
commit
24c8f6864d
3 changed files with 10 additions and 6 deletions
|
@ -64,6 +64,11 @@ TEST_F(nix_api_util_context, nix_store_open_dummy)
|
|||
Store * store = nix_store_open(ctx, "dummy://", nullptr);
|
||||
ASSERT_EQ(NIX_OK, ctx->last_err_code);
|
||||
ASSERT_STREQ("dummy", store->ptr->getUri().c_str());
|
||||
|
||||
char value[256];
|
||||
nix_store_get_version(ctx, store, value, 256);
|
||||
ASSERT_STREQ("", value);
|
||||
|
||||
nix_store_unref(store);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue