diff options
| author | Michael Biebl <biebl@debian.org> | 2017-07-12 17:57:30 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2017-07-12 17:57:30 +0200 |
| commit | b9f0451fa35393ceedf6d9d20b78c43578ebea5d (patch) | |
| tree | 417afcdd717020ad44e25fadee4b89de23316e83 /shared/nm-utils/nm-test-utils.h | |
| parent | c333f062ddcba9b35330647bf6cbd0a07f2d786e (diff) | |
New upstream version 1.8.2 upstream/1.8.2
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 0dfdfce6..bc521131 100644 --- a/shared/nm-utils/nm-test-utils.h +++ b/shared/nm-utils/nm-test-utils.h @@ -1183,6 +1183,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 |