Skip Menu |

This queue is for tickets about the YAML-Tiny CPAN distribution.

Report information
The Basics
Id: 89424
Status: resolved
Priority: 0/
Queue: YAML-Tiny

People
Owner: jkeenan [...] cpan.org
Requestors: jkeenan [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Add test for failure to provide a filename to write()
A piece of low-hanging fruit left over from previous coverage-boosting patch. Attached.
Subject: 0001-Test-failure-to-provide-filename-to-write.patch
From 2e99c44f812300b2142dd59d6f9cad99499f9fd8 Mon Sep 17 00:00:00 2001 From: jkeenan <jkeenan@cpan.org> Date: Sat, 12 Oct 2013 18:40:38 -0400 Subject: [PATCH] Test failure to provide filename to write(). --- t/24_misc.t | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/t/24_misc.t b/t/24_misc.t index ff210f1..9aa4861 100644 --- a/t/24_misc.t +++ b/t/24_misc.t @@ -9,7 +9,7 @@ BEGIN { use File::Spec::Functions ':ALL'; use t::lib::Test; -use Test::More qw(no_plan); # tests => 24;; +use Test::More tests => 20;; use YAML::Tiny; use File::Temp qw(tempfile); @@ -22,6 +22,9 @@ use File::Temp qw(tempfile); eval { $yaml = $obj->read($file); }; ok(! YAML::Tiny->errstr, "\$obj->read: No error, as expected"); isa_ok( $yaml, 'YAML::Tiny' ); + eval { $yaml->write(); }; + like( YAML::Tiny->errstr, qr/No file name provided/, + "No filename provided to write()"); $YAML::Tiny::errstr = ''; } -- 1.6.3.2
On Sat Oct 12 18:53:52 2013, JKEENAN wrote: Show quoted text
> A piece of low-hanging fruit left over from previous coverage-boosting > patch. Attached.
Applied to master: commit aff8301d87572b4140856c8eb9708fa67a9ab5af Author: jkeenan <jkeenan@cpan.org> AuthorDate: Sat Oct 12 18:40:38 2013 -0400 Commit: James E Keenan <jkeenan@cpan.org> CommitDate: Mon Oct 21 20:55:32 2013 -0400 Test failure to provide filename to write().