<commit_before>#!/usr/bin/env python
#  -*- coding: utf-8 -*-
#
#  patch_tests.py:  some basic patch tests
#
#  Subversion is a tool for revision control.
#  See http://subversion.tigris.org for more information.
#
# ====================================================================
# Copyright (c) 2007, 2009 CollabNet.  All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.  The terms
# are also available at http://subversion.tigris.org/license-1.html.
# If newer versions of this license are posted there, you may use a
# newer version instead, at your option.
#
######################################################################

# General modules
import sys, re, os
import zlib, base64 #needed for diff_svnpatch test
import textwrap
import warnings

# Our testing module
import svntest
from svntest import wc
from svntest.main import SVN_PROP_MERGEINFO

# (abbreviation)
Skip = svntest.testcase.Skip
SkipUnless = svntest.testcase.SkipUnless
XFail = svntest.testcase.XFail
Item = svntest.wc.StateItem

########################################################################
#Tools

def svnpatch_encode(l):
  return [x + "\n" for x in textwrap.wrap(base64.encodestring(zlib.compress("".join(l))), 76)]

gnupatch_garbage_re =\
 re.compile("^patch: \*\*\*\* Only garbage was found in the patch input.$")

########################################################################
#Tests

def patch_basic(sbox):<commit_msg>* subversion/tests/cmdline/patch_tests.py   (global): Reintroduce alias for svntest.testcase.Wimp.<commit_after>#!/usr/bin/env python
#  -*- coding: utf-8 -*-
#
#  patch_tests.py:  some basic patch tests
#
#  Subversion is a tool for revision control.
#  See http://subversion.tigris.org for more information.
#
# ====================================================================
# Copyright (c) 2007, 2009 CollabNet.  All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.  The terms
# are also available at http://subversion.tigris.org/license-1.html.
# If newer versions of this license are posted there, you may use a
# newer version instead, at your option.
#
######################################################################

# General modules
import sys, re, os
import zlib, base64 #needed for diff_svnpatch test
import textwrap
import warnings

# Our testing module
import svntest
from svntest import wc
from svntest.main import SVN_PROP_MERGEINFO

# (abbreviation)
Skip = svntest.testcase.Skip
SkipUnless = svntest.testcase.SkipUnless
XFail = svntest.testcase.XFail
Wimp = svntest.testcase.Wimp
Item = svntest.wc.StateItem

########################################################################
#Tools

def svnpatch_encode(l):
  return [x + "\n" for x in textwrap.wrap(base64.encodestring(zlib.compress("".join(l))), 76)]

gnupatch_garbage_re =\
 re.compile("^patch: \*\*\*\* Only garbage was found in the patch input.$")

########################################################################
#Tests

def patch_basic(sbox):
{'fraction_non_alphanumeric': 0.265022137887413, 'fraction_numerical': 0.010120177103099304, 'mean_word_length': 5.441955193482689, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5550176', 'n_tokens_mistral': 944, 'n_tokens_neox': 876, 'n_words': 283}