Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Nathan Hilterbrand Newsgroups: comp.lang.python Subject: Re: ignoring or replacing white lines in a diff Date: Thu, 14 Jan 2016 15:57:08 -0500 Lines: 143 Message-ID: References: <5697f08f$0$23822$e4fe514c@news.xs4all.nl> <5698118F0200001B0003B68D@gwsmtp1.astron.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de kcDLHcUKi50XptRc6j0hTAWkO9saZg1IUwmrF2+xdm6g== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'diff': 0.05; 'fixes': 0.05; 'below)': 0.07; 'rewrite': 0.07; '101': 0.09; 'behave': 0.09; 'cmd': 0.09; 'here?': 0.09; 'long"': 0.09; 'python:': 0.09; 'regression': 0.09; 'xml.': 0.09; 'python': 0.10; 'template': 0.11; 'output': 0.13; 'suggest': 0.15; 'options.': 0.15; 'properly': 0.15; '(diff': 0.16; "(it's": 0.16; 'bits,': 0.16; 'fluent': 0.16; 'ignores': 0.16; 'loops': 0.16; 'observatory': 0.16; 'osx': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'url:gnu': 0.16; 'wrote:': 0.16; 'version.': 0.18; '(on': 0.22; 'file:': 0.22; 'file.': 0.22; 'trying': 0.22; 'needed.': 0.23; 'replacing': 0.23; 'tried': 0.24; 'import': 0.24; 'xml': 0.24; 'header:In-Reply-To:1': 0.24; 'module': 0.25; 'script': 0.25; "i've": 0.25; 'header:User-Agent:1': 0.26; "doesn't": 0.26; 'command': 0.26; 'appreciated.': 0.27; 'earlier': 0.27; 'point.': 0.27; 'compare': 0.27; 'skip:f 40': 0.27; "skip:' 10": 0.28; '---': 0.28; 'skip:/ 80': 0.29; 'url:software': 0.29; 'whitespace': 0.29; "i'm": 0.30; 'print': 0.30; 'work.': 0.30; 'maybe': 0.33; 'problem': 0.33; 'option.': 0.33; 'quotes': 0.33; 'phone:': 0.33; 'message-id:@gmail.com': 0.34; '(for': 0.34; 'running': 0.34; 'received:google.com': 0.35; 'quite': 0.35; 'according': 0.36; 'should': 0.36; 'url:org': 0.36; 'lines': 0.36; 'received:209.85': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'two': 0.37; 'thanks': 0.37; 'seem': 0.37; 'starting': 0.37; 'things': 0.38; 'version': 0.38; 'received:209': 0.38; 'wrong': 0.38; 'someone': 0.38; 'files': 0.38; 'received:209.85.220': 0.38; 'test': 0.39; 'does': 0.39; 'skip:x 10': 0.40; 'to:addr:python.org': 0.40; 'some': 0.40; 'software': 0.40; 'email:': 0.62; 'charset:windows-1252': 0.62; 'between': 0.65; 'differences': 0.66; 'here': 0.66; 'results': 0.66; 'reply': 0.68; 'received:10.10': 0.76; '100': 0.79; 'escaping': 0.84; 'nathan': 0.84; 'netherlands': 0.84; 'received:10.10.10': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=cGdlBrfnMA2ngo8JyeMDNwyBePvGVtSGSmPZY7e9xRc=; b=iy72WPGROahAyOzUJ7gpnszqTde61JDqx0J0SQIgbHeCNFuuRLe7qFaf1rxUsycUsg OvliNpJjHkNWseZ1UjqI8yLFC24ClcllELacpFqY+ZcjuXTqiycx9GK00ZOSz0FBd1ao Fv6CQuMfvaiJ0NbZDsRbbntVQnzD5Zxpo9ylZVuL2Y7kZJzuz523y0hMfJA6Q2u6dDEe yVm2S1sEWXKMY/fVDQq8F9peih5bTb3rn3c4A9NDIsoC2B9YY4+oT3ChEkDI9gh/bsPz 6mB/NlGpuUP806hrTUbXt5ST8ZVIOih6kBeoW0my1KNjHfr0xSICfcwsfgC0Disev+Qi vR5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=cGdlBrfnMA2ngo8JyeMDNwyBePvGVtSGSmPZY7e9xRc=; b=ieLxE7JHAM8p4ZVu3cl54v0o3qK0O+r7g98zgg+T8aAPfYQ7g87pikgwTJbfyeZA28 jF7oXbAsQD+fZnaz6kU4Unm5Eo47Ym+77HnUySRjEDzo2W+I/pdJclKh1Ep56Pm4T3up njSE9cVX1Y/yvQFwdWTaPXSakryr/9mvlXRrK2CAHGt4JCOfUoMScI+cWMCbVlqDV+97 wa5C18YM6RM+xFqnQcxSydHypcDfO7G703/k2HugGx+KvPZRa3dB2VMHdbYWnEouBPfi v7NhMMcoyI/bSm0/PYaRK7gcyTnhwMixwmFEAFRwPzAxKVDGtFAkrwPD5cnA2vmrTLMB 5B7Q== X-Gm-Message-State: ALoCoQnKtycDwsfQSlUzVh2PpUGeONXpe6gIssi430akZGIpTlazP5A5UejbI3WyvXsMFCHhcrGxHiQXR9qz1QjrGTiCC0QlSQ== X-Received: by 10.55.27.98 with SMTP id b95mr8744325qkb.51.1452805030084; Thu, 14 Jan 2016 12:57:10 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 In-Reply-To: <5698118F0200001B0003B68D@gwsmtp1.astron.nl> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:101714 On 01/14/2016 03:22 PM, Adriaan Renting wrote: > Maybe someone here has a clue what is going wrong here? Any help is > appreciated. > > I'm writing a regression test for a module that generates XML. > > I'm using diff to compare the results with a pregenerated one from an > earlier version. > > I'm running into two problems: > > The diff doesn't seem to behave properly with the -B option. (diff (GNU > diffutils) 2.8.1 on OSX 10.9) > > Replacing -B with -I '^[[:space:]]*$' fixes it on the command line, > which should be exactly the same according to: > http://www.gnu.org/software/diffutils/manual/html_node/Blank-Lines.html#Blank-Lines > > (for Python problem continue below) > > MacRenting 21:00-159> diff -w -B test.xml xml/Ticket_6923.xml > 3,5c3,5 > < 2.15.0 > <