mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	Fix regression causing non-global config options to be ignored when replacing placeholders in output filename format. #1831
This commit is contained in:
		
							parent
							
								
									96c2c21707
								
							
						
					
					
						commit
						bc054e613c
					
				
					 2 changed files with 18 additions and 2 deletions
				
			
		
							
								
								
									
										11
									
								
								t/print.t
									
										
									
									
									
								
							
							
						
						
									
										11
									
								
								t/print.t
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
use Test::More tests => 2;
 | 
			
		||||
use Test::More tests => 4;
 | 
			
		||||
use strict;
 | 
			
		||||
use warnings;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -30,4 +30,13 @@ use Slic3r::Test;
 | 
			
		|||
    ok abs(unscale($center->[Y]) - $config->print_center->[Y]) < epsilon, 'print is centered around print_center (Y)';
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
{
 | 
			
		||||
    my $config = Slic3r::Config->new_from_defaults;
 | 
			
		||||
    $config->set('output_filename_format', '[travel_speed]_[layer_height].gcode');
 | 
			
		||||
    my $print = Slic3r::Test::init_print('20mm_cube', config => $config);
 | 
			
		||||
    my $output_file = $print->expanded_output_filepath(undef, "foo.stl");
 | 
			
		||||
    ok $output_file !~ /\[travel_speed\]/, 'print config options are replaced in output filename';
 | 
			
		||||
    ok $output_file !~ /\[layer_height\]/, 'region config options are replaced in output filename';
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
__END__
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue