tests/test-merge2.t
author Augie Fackler <augie@google.com>
Wed, 17 Jan 2018 15:47:38 -0500
changeset 35670 2b9e2415f5b5
parent 16913 f2719b387380
child 44177 1850066f9e36
permissions -rw-r--r--
contrib: add some basic scaffolding for some fuzz test targets I'd like to get the majority of our C code covered by automated fuzz testing. I've started with bdiff because it was already decoupled from libpython and therefore was fairly quick to produce a working fuzzer. The code here is a little odd because I've been having trouble convincing libfuzzer to define a main and I threw in the towel. This code will also work with github.com/google/oss-fuzz, and once it lands in our main repo I intend to enable automated fuzzing in oss-fuzz with reports going to our security alias. Differential Revision: https://phab.mercurial-scm.org/D1875

  $ hg init t
  $ cd t
  $ echo This is file a1 > a
  $ hg add a
  $ hg commit -m "commit #0"
  $ echo This is file b1 > b
  $ hg add b
  $ hg commit -m "commit #1"
  $ rm b
  $ hg update 0
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
  $ echo This is file b2 > b
  $ hg add b
  $ hg commit -m "commit #2"
  created new head
  $ cd ..; rm -r t

  $ mkdir t
  $ cd t
  $ hg init
  $ echo This is file a1 > a
  $ hg add a
  $ hg commit -m "commit #0"
  $ echo This is file b1 > b
  $ hg add b
  $ hg commit -m "commit #1"
  $ rm b
  $ hg update 0
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
  $ echo This is file b2 > b
  $ hg commit -A -m "commit #2"
  adding b
  created new head
  $ cd ..; rm -r t

  $ hg init t
  $ cd t
  $ echo This is file a1 > a
  $ hg add a
  $ hg commit -m "commit #0"
  $ echo This is file b1 > b
  $ hg add b
  $ hg commit -m "commit #1"
  $ rm b
  $ hg remove b
  $ hg update 0
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
  $ echo This is file b2 > b
  $ hg commit -A -m "commit #2"
  adding b
  created new head

  $ cd ..