diff options
author | Thomas Haller <thaller@redhat.com> | 2017-05-25 14:03:42 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-05-30 11:10:19 +0200 |
commit | ba05819c89d913ad1bc6b86e62c7704d173ef534 (patch) | |
tree | bc78cfa23d37d6f74ad0aa5dab4500499c4d87bf /shared/nm-utils/nm-test-utils.h | |
parent | 371b761680d660ea61ae33e02916564a0c3acc02 (diff) | |
download | NetworkManager-ba05819c89d913ad1bc6b86e62c7704d173ef534.tar.gz |
ifcfg-rh/tests: add test for reading NETMASK property
Diffstat (limited to 'shared/nm-utils/nm-test-utils.h')
-rw-r--r-- | shared/nm-utils/nm-test-utils.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/shared/nm-utils/nm-test-utils.h b/shared/nm-utils/nm-test-utils.h index 531dc6e62e..d2d96620cc 100644 --- a/shared/nm-utils/nm-test-utils.h +++ b/shared/nm-utils/nm-test-utils.h @@ -1205,6 +1205,15 @@ nmtst_file_get_contents (const char *filename) return contents; } +#define nmtst_file_set_contents(filename, content) \ + G_STMT_START { \ + GError *_error = NULL; \ + gboolean _success; \ + \ + _success = g_file_set_contents ((filename), (content), -1, &_error); \ + nmtst_assert_success (_success, _error); \ + } G_STMT_END + /*****************************************************************************/ static inline void |