Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145977400
D9007.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
11 KB
Referenced Files
None
Subscribers
None
D9007.id.diff
View Options
Index: head/usr.bin/indent/tests/comments.0
===================================================================
--- head/usr.bin/indent/tests/comments.0
+++ head/usr.bin/indent/tests/comments.0
@@ -0,0 +1,25 @@
+/* $FreeBSD$ */
+/* See r303597, r303598, r309219, and r309343 */
+void t(void) {
+ /*
+ * Old indent wrapped the URL near where this sentence ends.
+ *
+ * https://www.freebsd.org/cgi/man.cgi?query=indent&apropos=0&sektion=0&manpath=FreeBSD+12-current&arch=default&format=html
+ */
+
+ /*
+ * Old indent did not wrap to column 78
+ *
+ * aaaaaa bbbbbb cccccc dddddd eeeeee ffffff ggggg hhhhh iiiii jjjj kk
+ */
+
+ /*
+ * Old indent unnecessarily removed the star comment continuation on the next line.
+ *
+ * *test*
+ */
+
+ /* r309219 Go through linked list, freeing from the malloced (t[-1]) address. */
+
+ /* r309343 */
+}
Index: head/usr.bin/indent/tests/comments.0.stdout
===================================================================
--- head/usr.bin/indent/tests/comments.0.stdout
+++ head/usr.bin/indent/tests/comments.0.stdout
@@ -0,0 +1,32 @@
+/* $FreeBSD$ */
+/* See r303597, r303598, r309219, and r309343 */
+void
+t(void)
+{
+ /*
+ * Old indent wrapped the URL near where this sentence ends.
+ *
+ * https://www.freebsd.org/cgi/man.cgi?query=indent&apropos=0&sektion=0&manpath=FreeBSD+12-current&arch=default&format=html
+ */
+
+ /*
+ * Old indent did not wrap to column 78
+ *
+ * aaaaaa bbbbbb cccccc dddddd eeeeee ffffff ggggg hhhhh iiiii jjjj
+ * kk
+ */
+
+ /*
+ * Old indent unnecessarily removed the star comment continuation on
+ * the next line.
+ *
+ * *test*
+ */
+
+ /*
+ * r309219 Go through linked list, freeing from the malloced (t[-1])
+ * address.
+ */
+
+ /* r309343 */
+}
Index: head/usr.bin/indent/tests/declarations.0
===================================================================
--- head/usr.bin/indent/tests/declarations.0
+++ head/usr.bin/indent/tests/declarations.0
@@ -0,0 +1,21 @@
+/* $FreeBSD$ */
+/* See r303570 */
+void t(void) {
+ int a,
+ b,
+ c;
+ int
+ *d,
+ *e,
+ *f;
+ int (*g)(),
+ (*h)(),
+ (*i)();
+ int j,
+ k,
+ l;
+ int m
+ ,n
+ ,o
+ ;
+}
Index: head/usr.bin/indent/tests/declarations.0.stdout
===================================================================
--- head/usr.bin/indent/tests/declarations.0.stdout
+++ head/usr.bin/indent/tests/declarations.0.stdout
@@ -0,0 +1,15 @@
+/* $FreeBSD$ */
+/* See r303570 */
+void
+t(void)
+{
+ int a, b, c;
+ int
+ *d, *e, *f;
+ int (*g) (), (*h) (), (*i) ();
+ int j, k, l;
+ int m
+ ,n
+ ,o
+ ;
+}
Index: head/usr.bin/indent/tests/elsecomment.0
===================================================================
--- head/usr.bin/indent/tests/elsecomment.0
+++ head/usr.bin/indent/tests/elsecomment.0
@@ -0,0 +1,18 @@
+/* $FreeBSD$ */
+/* See r303484 and r309342 */
+void t(void) {
+ if (0) {
+
+ } /* Old indent would remove the following blank line */
+
+ /*
+ * test
+ */
+
+ if (1)
+ ;
+ else /* Old indent would get very confused here */
+ {
+
+ }
+}
Index: head/usr.bin/indent/tests/elsecomment.0.stdout
===================================================================
--- head/usr.bin/indent/tests/elsecomment.0.stdout
+++ head/usr.bin/indent/tests/elsecomment.0.stdout
@@ -0,0 +1,22 @@
+/* $FreeBSD$ */
+/* See r303484 and r309342 */
+void
+t(void)
+{
+ if (0)
+ {
+
+ } /* Old indent would remove the following
+ * blank line */
+
+ /*
+ * test
+ */
+
+ if (1)
+ ;
+ else /* Old indent would get very confused here */
+ {
+
+ }
+}
Index: head/usr.bin/indent/tests/elsecomment.pro
===================================================================
--- head/usr.bin/indent/tests/elsecomment.pro
+++ head/usr.bin/indent/tests/elsecomment.pro
@@ -0,0 +1,2 @@
+/* $FreeBSD$ */
+-bl
Index: head/usr.bin/indent/tests/float.0
===================================================================
--- head/usr.bin/indent/tests/float.0
+++ head/usr.bin/indent/tests/float.0
@@ -0,0 +1,6 @@
+/* $FreeBSD$ */
+/* See r303499 */
+void t(void) {
+ unsigned long x = 314UL;
+ float y = 3.14f;
+}
Index: head/usr.bin/indent/tests/float.0.stdout
===================================================================
--- head/usr.bin/indent/tests/float.0.stdout
+++ head/usr.bin/indent/tests/float.0.stdout
@@ -0,0 +1,8 @@
+/* $FreeBSD$ */
+/* See r303499 */
+void
+t(void)
+{
+ unsigned long x = 314UL;
+ float y = 3.14f;
+}
Index: head/usr.bin/indent/tests/label.0
===================================================================
--- head/usr.bin/indent/tests/label.0
+++ head/usr.bin/indent/tests/label.0
@@ -0,0 +1,13 @@
+/* $FreeBSD$ */
+/* See r303489 */
+void t(void) {
+ switch (1)
+ {
+ case 1: /* test */
+ case 2: /* test */
+ }
+CLEANUP:
+ ;
+V: ;
+U: ;
+}
Index: head/usr.bin/indent/tests/label.0.stdout
===================================================================
--- head/usr.bin/indent/tests/label.0.stdout
+++ head/usr.bin/indent/tests/label.0.stdout
@@ -0,0 +1,14 @@
+/* $FreeBSD$ */
+/* See r303489 */
+void
+t(void)
+{
+ switch (1) {
+ case 1: /* test */
+ case 2: /* test */
+ }
+CLEANUP:
+ ;
+V: ;
+U: ;
+}
Index: head/usr.bin/indent/tests/label.pro
===================================================================
--- head/usr.bin/indent/tests/label.pro
+++ head/usr.bin/indent/tests/label.pro
@@ -0,0 +1,2 @@
+/* $FreeBSD$ */
+-nut
Index: head/usr.bin/indent/tests/list_head.0
===================================================================
--- head/usr.bin/indent/tests/list_head.0
+++ head/usr.bin/indent/tests/list_head.0
@@ -0,0 +1,16 @@
+/* $FreeBSD$ */
+/* See r309380 */
+static int
+do_execve(td, args, mac_p)
+ struct thread *td;
+ struct image_args *args;
+ struct mac *mac_p;
+{
+
+}
+
+static LIST_HEAD(, alq) ald_active;
+static int ald_shuttingdown = 0;
+struct thread *ald_thread;
+
+
Index: head/usr.bin/indent/tests/list_head.0.stdout
===================================================================
--- head/usr.bin/indent/tests/list_head.0.stdout
+++ head/usr.bin/indent/tests/list_head.0.stdout
@@ -0,0 +1,14 @@
+/* $FreeBSD$ */
+/* See r309380 */
+static int
+do_execve(td, args, mac_p)
+ struct thread *td;
+ struct image_args *args;
+ struct mac *mac_p;
+{
+
+}
+
+static LIST_HEAD(, alq) ald_active;
+static int ald_shuttingdown = 0;
+struct thread *ald_thread;
Index: head/usr.bin/indent/tests/nsac.0
===================================================================
--- head/usr.bin/indent/tests/nsac.0
+++ head/usr.bin/indent/tests/nsac.0
@@ -0,0 +1,4 @@
+/* $FreeBSD$ */
+void t(void) {
+ int a = (double) 8;
+}
Index: head/usr.bin/indent/tests/nsac.0.stdout
===================================================================
--- head/usr.bin/indent/tests/nsac.0.stdout
+++ head/usr.bin/indent/tests/nsac.0.stdout
@@ -0,0 +1,6 @@
+/* $FreeBSD$ */
+void
+t(void)
+{
+ int a = (double)8;
+}
Index: head/usr.bin/indent/tests/nsac.pro
===================================================================
--- head/usr.bin/indent/tests/nsac.pro
+++ head/usr.bin/indent/tests/nsac.pro
@@ -0,0 +1,2 @@
+/* $FreeBSD$ */
+-nsac
Index: head/usr.bin/indent/tests/offsetof.0
===================================================================
--- head/usr.bin/indent/tests/offsetof.0
+++ head/usr.bin/indent/tests/offsetof.0
@@ -0,0 +1,5 @@
+/* $FreeBSD$ */
+/* See r303718 */
+void t(void) {
+ int n = malloc(offsetof(struct s, f) + 1);
+}
Index: head/usr.bin/indent/tests/offsetof.0.stdout
===================================================================
--- head/usr.bin/indent/tests/offsetof.0.stdout
+++ head/usr.bin/indent/tests/offsetof.0.stdout
@@ -0,0 +1,7 @@
+/* $FreeBSD$ */
+/* See r303718 */
+void
+t(void)
+{
+ int n = malloc(offsetof(struct s, f) + 1);
+}
Index: head/usr.bin/indent/tests/sac.0
===================================================================
--- head/usr.bin/indent/tests/sac.0
+++ head/usr.bin/indent/tests/sac.0
@@ -0,0 +1,4 @@
+/* $FreeBSD$ */
+void t(void) {
+ int a = (double) 8;
+}
Index: head/usr.bin/indent/tests/sac.0.stdout
===================================================================
--- head/usr.bin/indent/tests/sac.0.stdout
+++ head/usr.bin/indent/tests/sac.0.stdout
@@ -0,0 +1,6 @@
+/* $FreeBSD$ */
+void
+t(void)
+{
+ int a = (double) 8;
+}
Index: head/usr.bin/indent/tests/sac.pro
===================================================================
--- head/usr.bin/indent/tests/sac.pro
+++ head/usr.bin/indent/tests/sac.pro
@@ -0,0 +1,2 @@
+/* $FreeBSD$ */
+-sac
Index: head/usr.bin/indent/tests/struct.0
===================================================================
--- head/usr.bin/indent/tests/struct.0
+++ head/usr.bin/indent/tests/struct.0
@@ -0,0 +1,13 @@
+/* $FreeBSD$ */
+/* See r303485 */
+void
+t(void)
+{
+ static const struct {
+ int a;
+ int b;
+ } c[] = {
+ { D, E },
+ { F, G }
+ };
+}
Index: head/usr.bin/indent/tests/struct.0.stdout
===================================================================
--- head/usr.bin/indent/tests/struct.0.stdout
+++ head/usr.bin/indent/tests/struct.0.stdout
@@ -0,0 +1,13 @@
+/* $FreeBSD$ */
+/* See r303485 */
+void
+t(void)
+{
+ static const struct {
+ int a;
+ int b;
+ } c[] = {
+ {D, E},
+ {F, G}
+ };
+}
Index: head/usr.bin/indent/tests/surplusbad.0
===================================================================
--- head/usr.bin/indent/tests/surplusbad.0
+++ head/usr.bin/indent/tests/surplusbad.0
@@ -0,0 +1,9 @@
+/* $FreeBSD$ */
+/* See r303599 */
+#if defined(__i386__)
+int a;
+#elif defined(__amd64__)
+int b;
+#else
+#error "Port me"
+#endif
Index: head/usr.bin/indent/tests/surplusbad.0.stdout
===================================================================
--- head/usr.bin/indent/tests/surplusbad.0.stdout
+++ head/usr.bin/indent/tests/surplusbad.0.stdout
@@ -0,0 +1,9 @@
+/* $FreeBSD$ */
+/* See r303599 */
+#if defined(__i386__)
+int a;
+#elif defined(__amd64__)
+int b;
+#else
+#error "Port me"
+#endif
Index: head/usr.bin/indent/tests/surplusbad.pro
===================================================================
--- head/usr.bin/indent/tests/surplusbad.pro
+++ head/usr.bin/indent/tests/surplusbad.pro
@@ -0,0 +1,2 @@
+/* $FreeBSD$ */
+-bad
Index: head/usr.bin/indent/tests/types_from_file.0
===================================================================
--- head/usr.bin/indent/tests/types_from_file.0
+++ head/usr.bin/indent/tests/types_from_file.0
@@ -0,0 +1,3 @@
+/* $FreeBSD$ */
+/* See r303735 */
+void t(a *x, b *y, c *z);
Index: head/usr.bin/indent/tests/types_from_file.0.stdout
===================================================================
--- head/usr.bin/indent/tests/types_from_file.0.stdout
+++ head/usr.bin/indent/tests/types_from_file.0.stdout
@@ -0,0 +1,3 @@
+/* $FreeBSD$ */
+/* See r303735 */
+void t(a *x, b *y, c * z);
Index: head/usr.bin/indent/tests/types_from_file.list
===================================================================
--- head/usr.bin/indent/tests/types_from_file.list
+++ head/usr.bin/indent/tests/types_from_file.list
@@ -0,0 +1,2 @@
+b
+a
\ No newline at end of file
Index: head/usr.bin/indent/tests/types_from_file.pro
===================================================================
--- head/usr.bin/indent/tests/types_from_file.pro
+++ head/usr.bin/indent/tests/types_from_file.pro
@@ -0,0 +1,2 @@
+/* $FreeBSD$ */
+-Utypes_from_file.list
Index: head/usr.bin/indent/tests/wchar.0
===================================================================
--- head/usr.bin/indent/tests/wchar.0
+++ head/usr.bin/indent/tests/wchar.0
@@ -0,0 +1,6 @@
+/* $FreeBSD$ */
+/* See r309220 */
+#include <wchar.h>
+
+wchar_t *x = L"test";
+wchar_t y = L't';
Index: head/usr.bin/indent/tests/wchar.0.stdout
===================================================================
--- head/usr.bin/indent/tests/wchar.0.stdout
+++ head/usr.bin/indent/tests/wchar.0.stdout
@@ -0,0 +1,6 @@
+/* $FreeBSD$ */
+/* See r309220 */
+#include <wchar.h>
+
+wchar_t *x = L"test";
+wchar_t y = L't';
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Feb 27, 5:10 PM (10 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29036896
Default Alt Text
D9007.id.diff (11 KB)
Attached To
Mode
D9007: Add regression tests for indent(1)
Attached
Detach File
Event Timeline
Log In to Comment