Skip to content

Commit

Permalink
Merge pull request #2835 from cgwalters/more-gfileinfo
Browse files Browse the repository at this point in the history
tests: Set size on fileinfo
  • Loading branch information
cgwalters authored Mar 17, 2023
2 parents 12fac1e + 813c439 commit 4238ef4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test-basic-c.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,12 @@ static gboolean hi_content_stream_new (GInputStream **out_stream,
GError **error)
{
static const char hi[] = "hi";
g_autoptr(GMemoryInputStream) hi_memstream = (GMemoryInputStream*)g_memory_input_stream_new_from_data (hi, sizeof(hi)-1, NULL);
const size_t len = sizeof(hi)-1;
g_autoptr(GMemoryInputStream) hi_memstream = (GMemoryInputStream*)g_memory_input_stream_new_from_data (hi, len, NULL);
g_autoptr(GFileInfo) finfo = g_file_info_new ();
g_file_info_set_attribute_uint32 (finfo, "standard::type", G_FILE_TYPE_REGULAR);
g_file_info_set_attribute_boolean (finfo, "standard::is-symlink", FALSE);
g_file_info_set_size (finfo, len);
g_file_info_set_attribute_uint32 (finfo, "unix::uid", 0);
g_file_info_set_attribute_uint32 (finfo, "unix::gid", 0);
g_file_info_set_attribute_uint32 (finfo, "unix::mode", S_IFREG|0644);
Expand Down

0 comments on commit 4238ef4

Please sign in to comment.