~ubuntu-branches/ubuntu/natty/gnome-keyring/natty

« back to all changes in this revision

Viewing changes to pkcs11/gck/tests/unit-test-transaction.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2010-02-16 19:00:06 UTC
  • mfrom: (1.1.58 upstream)
  • Revision ID: james.westby@ubuntu.com-20100216190006-cqpnic4zxlkmmi0o
Tags: 2.29.90git20100218-0ubuntu1
Updated to a git snapshot version

Show diffs side-by-side

added added

removed removed

Lines of Context:
190
190
DEFINE_TEST(remove_file_success)
191
191
{
192
192
        GckTransaction *transaction = gck_transaction_new ();
193
 
        gchar *filename = test_build_filename ("remove-file");
 
193
        gchar *filename = test_scratch_filename ("remove-file");
194
194
        
195
195
        g_assert (g_file_set_contents (filename, "xxx", 3, NULL));
196
196
        g_assert (g_file_test (filename, G_FILE_TEST_IS_REGULAR));
210
210
DEFINE_TEST(remove_file_abort)
211
211
{
212
212
        GckTransaction *transaction = gck_transaction_new ();
213
 
        gchar *filename = test_build_filename ("remove-file");
 
213
        gchar *filename = test_scratch_filename ("remove-file");
214
214
        gchar *data;
215
215
        gsize n_data;
216
216
        
242
242
DEFINE_TEST(remove_file_non_exist)
243
243
{
244
244
        GckTransaction *transaction = gck_transaction_new ();
245
 
        gchar *filename = test_build_filename ("remove-non-existant");
 
245
        gchar *filename = test_scratch_filename ("remove-non-existant");
246
246
 
247
247
        g_unlink (filename);
248
248
        
258
258
DEFINE_TEST(write_file)
259
259
{
260
260
        GckTransaction *transaction = gck_transaction_new ();
261
 
        gchar *filename = test_build_filename ("write-test");
 
261
        gchar *filename = test_scratch_filename ("write-test");
262
262
        gchar *data;
263
263
        gsize n_data;
264
264
        
284
284
DEFINE_TEST(write_file_abort_gone)
285
285
{
286
286
        GckTransaction *transaction = gck_transaction_new ();
287
 
        gchar *filename = test_build_filename ("write-test");
 
287
        gchar *filename = test_scratch_filename ("write-test");
288
288
        gchar *data;
289
289
        gsize n_data;
290
290
        
310
310
DEFINE_TEST(write_file_abort_revert)
311
311
{
312
312
        GckTransaction *transaction = gck_transaction_new ();
313
 
        gchar *filename = test_build_filename ("write-test");
 
313
        gchar *filename = test_scratch_filename ("write-test");
314
314
        gchar *data;
315
315
        
316
316
        g_assert (g_file_set_contents (filename, "my original", -1, NULL));