1#--- aa 2aa 3;--- bb 4; Comments are preserved. 5bb 6 7//--- subdir/cc 8cc 9//--- end 10 11# RUN: rm -rf %t 12# RUN: split-file %s %t 13# RUN: diff %S/Inputs/basic-aa.txt %t/aa 14# RUN: diff %S/Inputs/basic-bb.txt %t/bb 15# RUN: diff %S/Inputs/basic-cc.txt %t/subdir/cc 16# RUN: FileCheck %s --check-prefix=END < %t/end 17 18## Can be called on a non-empty directory. 19# RUN: split-file %s %t 20# RUN: diff %S/Inputs/basic-aa.txt %t/aa 21 22## Test that we will delete the output if it is a file, so that we can create 23## a directory. 24# RUN: rm -rf %t && touch %t 25# RUN: split-file %s %t 26# RUN: diff %S/Inputs/basic-aa.txt %t/aa 27 28# END: RUN: split-file %s %t 29 30# RUN: not %split-file 2>&1 | FileCheck %s --check-prefix=NO_INPUT 31 32# NO_INPUT: split-file: error: input filename is not specified 33 34# RUN: not %split-file %s '' 2>&1 | FileCheck %s --check-prefix=NO_OUTPUT 35 36# NO_OUTPUT: split-file: error: output directory is not specified 37 38# RUN: not %split-file %S/Inputs/basic-aa.txt %t 2>&1 | FileCheck %s --check-prefix=NOT_EXIST 39 40# NOT_EXIST: split-file: error: {{.*}}.txt: no part separator was found 41