]> xenbits.xensource.com Git - people/iwj/osstest.git/commitdiff
FIX NEXT-UNIQUE-NAME wip.stretch
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 30 Nov 2018 17:16:55 +0000 (17:16 +0000)
committerIan Jackson <ian.jackson@eu.citrix.com>
Fri, 30 Nov 2018 17:16:55 +0000 (17:16 +0000)
Osstest/TestSupport.pm

index 0a588fad818beb66be9fe64b0cb57f6237d6e18f..7bc98c521155626176f8838b45aedaaa6fce379b 100644 (file)
@@ -303,6 +303,12 @@ sub get_filecontents ($;$) {
 
 #---------- stashed files ----------
 
+sub next_unique_name ($) {
+    my ($fnref) = @_;
+    my $num = $$fnref =~ s/\+([1-9]\d*)$// ? $1 : 0;
+    $$fnref .= '+'.($num+1);
+}
+
 sub open_unique_stashfile ($) {
     my ($leafref) = @_;
     my $dh;
@@ -639,12 +645,6 @@ sub target_file_exists ($$) {
     die "$rfile $out ?";
 }
 
-sub next_unique_name ($) {
-    my ($fnref) = @_;
-    my $num = $$fnref =~ s/\+([1-9]\d*)$// ? $1 : 0;
-    $$fnref .= '+'.($num+1);
-}
-
 our $target_editfile_cancel_exception =
     bless { }, 'Osstest::TestSupport::TargetEditfileCancelException';