annotate tests/test-encode @ 12156:4c94b6d0fb1c

tests: remove unneeded -d flags Many tests fixed the commit date of their changesets at '1000000 0' or similar. However testing with "Mon Jan 12 13:46:40 1970 +0000" is not better than testing with "Thu Jan 01 00:00:00 1970 +0000", which is the default run-tests.py installs. Removing the unnecessary flag removes some clutter and will hopefully make it clearer what the tests are really trying to test. Some tests did not even change their output when the dates were changed, in which case the -d flag was truly irrelevant. Dates used in sequence (such as '0 0', '1 0', etc...) were left alone since they may make the test easier to understand.
author Martin Geisler <mg@lazybytes.net>
date Thu, 02 Sep 2010 23:22:51 +0200
parents 1c4ab236ebcb
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1258
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
1 #!/bin/sh
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
2
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
3 hg init
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
4
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
5 cat > .hg/hgrc <<EOF
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
6 [encode]
10279
1c4ab236ebcb test-encode: Use tr chacter classes instead of character ranges
Mads Kiilerich <mads@kiilerich.com>
parents: 10211
diff changeset
7 not.gz = tr [:lower:] [:upper:]
7080
a6477aa893b8 tests: Windows compatibility fixes
Patrick Mezard <pmezard@gmail.com>
parents: 6094
diff changeset
8 *.gz = gzip -d
1258
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
9
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
10 [decode]
10279
1c4ab236ebcb test-encode: Use tr chacter classes instead of character ranges
Mads Kiilerich <mads@kiilerich.com>
parents: 10211
diff changeset
11 not.gz = tr [:upper:] [:lower:]
1258
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
12 *.gz = gzip
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
13
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
14 EOF
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
15
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
16 echo "this is a test" | gzip > a.gz
10211
a474f950357b Update test and man page for multiple matching encode/decode filters
Mads Kiilerich <mads@kiilerich.com>
parents: 8742
diff changeset
17 echo "this is a test" > not.gz
a474f950357b Update test and man page for multiple matching encode/decode filters
Mads Kiilerich <mads@kiilerich.com>
parents: 8742
diff changeset
18 hg add *
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 10279
diff changeset
19 hg ci -m "test"
1258
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
20 echo %% no changes
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
21 hg status
10211
a474f950357b Update test and man page for multiple matching encode/decode filters
Mads Kiilerich <mads@kiilerich.com>
parents: 8742
diff changeset
22 touch *
1258
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
23
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
24 echo %% no changes
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
25 hg status
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
26
10211
a474f950357b Update test and man page for multiple matching encode/decode filters
Mads Kiilerich <mads@kiilerich.com>
parents: 8742
diff changeset
27 echo %% check contents in repo are encoded
3853
c0b449154a90 switch to the .hg/store layout, fix the tests
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 1933
diff changeset
28 hg debugdata .hg/store/data/a.gz.d 0
10211
a474f950357b Update test and man page for multiple matching encode/decode filters
Mads Kiilerich <mads@kiilerich.com>
parents: 8742
diff changeset
29 hg debugdata .hg/store/data/not.gz.d 0
1258
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
30
10211
a474f950357b Update test and man page for multiple matching encode/decode filters
Mads Kiilerich <mads@kiilerich.com>
parents: 8742
diff changeset
31 echo %% check committed content was decoded
1258
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
32 gunzip < a.gz
10211
a474f950357b Update test and man page for multiple matching encode/decode filters
Mads Kiilerich <mads@kiilerich.com>
parents: 8742
diff changeset
33 cat not.gz
1258
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
34
10211
a474f950357b Update test and man page for multiple matching encode/decode filters
Mads Kiilerich <mads@kiilerich.com>
parents: 8742
diff changeset
35 rm *
8742
a964ab624385 merge: allow merging going backwards
Matt Mackall <mpm@selenic.com>
parents: 7080
diff changeset
36 hg co -C
1258
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
37
10211
a474f950357b Update test and man page for multiple matching encode/decode filters
Mads Kiilerich <mads@kiilerich.com>
parents: 8742
diff changeset
38 echo %% check decoding of our new working dir copy
1258
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
39 gunzip < a.gz
10211
a474f950357b Update test and man page for multiple matching encode/decode filters
Mads Kiilerich <mads@kiilerich.com>
parents: 8742
diff changeset
40 cat not.gz
6093
f5b00b6e426a Option --decode for hg cat to apply decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 3853
diff changeset
41
f5b00b6e426a Option --decode for hg cat to apply decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 3853
diff changeset
42 echo %% check hg cat operation
f5b00b6e426a Option --decode for hg cat to apply decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 3853
diff changeset
43 hg cat a.gz
6094
3998c1b0828f cat --decode: Drop short option, use opts.get() instead of opts[]
Thomas Arendsen Hein <thomas@intevation.de>
parents: 6093
diff changeset
44 hg cat --decode a.gz | gunzip
6093
f5b00b6e426a Option --decode for hg cat to apply decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 3853
diff changeset
45 mkdir subdir
f5b00b6e426a Option --decode for hg cat to apply decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 3853
diff changeset
46 cd subdir
f5b00b6e426a Option --decode for hg cat to apply decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 3853
diff changeset
47 hg -R .. cat ../a.gz
6094
3998c1b0828f cat --decode: Drop short option, use opts.get() instead of opts[]
Thomas Arendsen Hein <thomas@intevation.de>
parents: 6093
diff changeset
48 hg -R .. cat --decode ../a.gz | gunzip