t / t9011-svn-da.shon commit vcs-svn: skeleton of an svn delta parser (ddcc8c5)
   1#!/bin/sh
   2
   3test_description='test parsing of svndiff0 files
   4
   5Using the "test-svn-fe -d" helper, check that svn-fe correctly
   6interprets deltas using various facilities (some from the spec,
   7some only learned from practice).
   8'
   9. ./test-lib.sh
  10
  11>empty
  12printf foo >preimage
  13
  14test_expect_success 'reject empty delta' '
  15        test_must_fail test-svn-fe -d preimage empty 0
  16'
  17
  18test_expect_success 'delta can empty file' '
  19        printf "SVNQ" | q_to_nul >clear.delta &&
  20        test-svn-fe -d preimage clear.delta 4 >actual &&
  21        test_cmp empty actual
  22'
  23
  24test_expect_success 'reject svndiff2' '
  25        printf "SVN\002" >bad.filetype &&
  26        test_must_fail test-svn-fe -d preimage bad.filetype 4
  27'
  28
  29test_expect_failure 'one-window empty delta' '
  30        printf "SVNQ%s" "QQQQQ" | q_to_nul >clear.onewindow &&
  31        test-svn-fe -d preimage clear.onewindow 9 >actual &&
  32        test_cmp empty actual
  33'
  34
  35test_done