File: copy-directories.bats

package info (click to toggle)
svn-all-fast-export 1.0.18%2Bgit20221225-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 524 kB
  • sloc: cpp: 3,192; sh: 95; makefile: 12
file content (28 lines) | stat: -rw-r--r-- 765 bytes parent folder | download | duplicates (2)
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
load 'common'

@test 'copying a directory with source not in target repo should dump full directory' {
    svn mkdir --parents project-a/dir-a
    touch project-a/dir-a/file-a
    svn add project-a/dir-a/file-a
    svn commit -m 'add project-a/dir-a/file-a'
    svn mkdir --parents project-b
    svn commit -m 'add project-b'
    svn cp project-a/dir-a project-b
    svn commit -m 'copy project-a/dir-a to project-b'

    cd "$TEST_TEMP_DIR"
    svn2git "$SVN_REPO" --debug-rules --rules <(echo "
        create repository git-repo
        end repository

        match /project-b/
            repository git-repo
            branch master
        end match

        match /project-a/
        end match
    ")

    assert git -C git-repo show master:dir-a/file-a
}