[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Possible bug: 2.2.11 not idempotent
From: |
Mouse |
Subject: |
Possible bug: 2.2.11 not idempotent |
Date: |
Mon, 18 Sep 2017 13:56:14 -0400 (EDT) |
At work, I have to use a Linux machine whose indent(1) manpage says, in
part,
BUGS
Please report any bugs to address@hidden
When indent is run twice on a file, with the same profile, it should
never change that file the second time. With the current design of
indent, this can not be guaranteed, and it has not been extensively
tested.
The second paragraph seems to indicate that non-idempotency is
considered a bug; in case you people consider it enough of a bug to be
worth tracking down, I have a test case which misbehaves for me (with
the OS's indent(1); "indent --version" reports "GNU indent 2.2.11").
If it still misbehaves with your current version, it might be useful as
a test case.
Command line: indent -npro -kr -i8 -ts8 -sob -l80 -ss -ncs -cp1 -il0
There are two input files below, each one base64ed; the above command
transforms each into the other. (That is, cascaded runs alternate
between the two.)
File 1 (base64ed):
dm9pZCBmb28oc3RydWN0IHRoaW5nICpub2RlLCBzdHJ1Y3Qgb3RoZXJodGluZyAq
aW5zaWRlKQp7CglpZiAobm9kZS0+bWVtYmVyMSAhPSBOVUxMKSB7CgkJaWYgKHN0
cm5jbXAobm9kZS0+bWVtYmVyMiwgInd4eXoiLCA0KSA9PSAwKSB7CgkJCXh5eigi
MTIzNDU2Nzg5YWIgKiVzOyAvKiglbGQpJXMqL1xuIiwKCQkJICAgIG5vZGUtPmFi
Y2RlZiwKCQkJICAgIG5vZGUtPmFiY2RlZmdoaWogPyBzdHJsZW4obm9kZS0+YWJj
ZGVmZ2hpaikgOiAwLAoJCQkgICAgbm9kZS0+CgkJCSAgICBhYmNkZWZnaGlqID8g
KGNoYXIgKilub2RlLT5hYmNkZWZnaGlqIDogIm51bGwiKTsKCQl9Cgl9Cn0K
File 2 (base64ed):
dm9pZCBmb28oc3RydWN0IHRoaW5nICpub2RlLCBzdHJ1Y3Qgb3RoZXJodGluZyAq
aW5zaWRlKQp7CglpZiAobm9kZS0+bWVtYmVyMSAhPSBOVUxMKSB7CgkJaWYgKHN0
cm5jbXAobm9kZS0+bWVtYmVyMiwgInd4eXoiLCA0KSA9PSAwKSB7CgkJCXh5eigi
MTIzNDU2Nzg5YWIgKiVzOyAvKiglbGQpJXMqL1xuIiwKCQkJICAgIG5vZGUtPmFi
Y2RlZiwKCQkJICAgIG5vZGUtPmFiY2RlZmdoaWogPyBzdHJsZW4obm9kZS0+YWJj
ZGVmZ2hpaikgOiAwLAoJCQkgICAgbm9kZS0+YWJjZGVmZ2hpaiA/IChjaGFyICop
bm9kZS0+CgkJCSAgICBhYmNkZWZnaGlqIDogIm51bGwiKTsKCQl9Cgl9Cn0K
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML address@hidden
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Possible bug: 2.2.11 not idempotent,
Mouse <=