Permalink
Browse files

added 'none' set

  • Loading branch information...
1 parent 3acdeb2 commit b29d935174842640c57a9179c0275dd9572a42ad @jberger committed Feb 18, 2013
Showing with 22 additions and 2 deletions.
  1. +2 −1 bin/makebeamerinfo
  2. +1 −0 lib/App/makebeamerinfo.pm
  3. +5 −1 lib/App/makebeamerinfo/Transitions.pm
  4. +14 −0 t/full.t
View
@@ -118,8 +118,9 @@ L<Impressive|http://impressive.sourceforge.net/> is a pdf viewer that aids in vi
Request a specific transition set. Currenly it may be one of:
- all allow all of the transitions
- default impressive's default transitions (default)
- - turn pageturn and wiperight, the author's preference
+ - none no transitions are used
- sane selections which make sense for beamer
+ - turn pageturn and wiperight, the author's preference
Note that these may also be specified with the (exported) environment
variable $MAKEBEAMERINFO_TRANSITIONS, again set to one of the above
@@ -18,6 +18,7 @@ use App::makebeamerinfo::Transitions 'new_transition_set';
my %transitions = (
all => new_transition_set('all', ':all'),
default => new_transition_set('default', ':default'),
+ none => new_transition_set('none', ':none'),
);
$transitions{turn} = new_transition_set(
@@ -36,7 +36,11 @@ sub new {
# handle shortcut
if ( @_ == 1 ) {
my $base = shift;
- push @_, frame => $base, increment => $base;
+ if ( $base eq ':none' ) {
+ push @_, frame => ':default', increment => ['None'];
+ } else {
+ push @_, frame => $base, increment => $base;
+ }
}
$self->_initialize(@_);
View
@@ -83,6 +83,20 @@ my $output = '';
unlike( $output, qr/transition/, 'Default set does not emit transition statments' );
unlike( $output, qr/AvailableTransitions/, 'Default set does not emit AvailableTransitions' );
+#=====================
+# Test 'none' set
+
+$app->transition_set( 'none' );
+
+$output = '';
+{
+ open my $output_handle, '>', \$output or die "Cannot open scalar for writing: $!";
+ $app->writeInfo($output_handle);
+}
+
+unlike( $output, qr/transition/, q{'none' set does not emit transition statments} );
+like( $output, qr/AvailableTransitions\s*=\s*[\s*None\s*]/, q{'none' AvailableTransitions is only 'None'} );
+
#=================
# Test turn set

0 comments on commit b29d935

Please sign in to comment.