-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path20add-nomime.t
36 lines (32 loc) · 1015 Bytes
/
20add-nomime.t
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/perl -w
use Test::More tests => 2;
use strict;
use SVK::Test;
our $output;
my ($xd, $svk) = build_test();
my ($copath, $corpath) = get_copath();
my ($repospath, undef, $repos) = $xd->find_repos ('//', 1);
$svk->checkout ('//', $copath);
chdir ($copath);
# Create some files with different mime types
create_mime_samples('mime');
# make sure that simple binary/not-binary detection is done
delete $ENV{SVKMIME};
is_output ($svk, 'add', ['mime'],
[__('A mime'),
__('A mime/empty.txt'),
__('A mime/false.bin'),
__('A mime/foo.bin - (bin)'),
__('A mime/foo.c'),
__('A mime/foo.html'),
__('A mime/foo.jpg - (bin)'),
__('A mime/foo.pl'),
__('A mime/foo.txt'),
__('A mime/not-audio.txt'),
]);
is_output ($svk, 'pl', ['-v', glob("mime/*")],
[__('Properties on mime/foo.bin:'),
' svn:mime-type: application/octet-stream',
__('Properties on mime/foo.jpg:'),
' svn:mime-type: application/octet-stream',
]);