diff options
| author | Enji Cooper <ngie@FreeBSD.org> | 2026-02-15 01:57:42 +0000 |
|---|---|---|
| committer | Enji Cooper <ngie@FreeBSD.org> | 2026-02-15 02:12:44 +0000 |
| commit | e8dbf2b6df199526a660f81de07d17925cfd8518 (patch) | |
| tree | cd0c09449bea5df56ef67059e797737d70587070 /usr.bin/diff | |
| parent | 56a7ce8416d181a2060d7a428aed9c3c6a431e6d (diff) | |
Diffstat (limited to 'usr.bin/diff')
| -rw-r--r-- | usr.bin/diff/functionname.in | 29 | ||||
| -rw-r--r-- | usr.bin/diff/functionname_c.in | 29 | ||||
| -rw-r--r-- | usr.bin/diff/functionname_c.out | 11 | ||||
| -rw-r--r-- | usr.bin/diff/header.out | 4 | ||||
| -rw-r--r-- | usr.bin/diff/header_ns.out | 4 | ||||
| -rw-r--r-- | usr.bin/diff/input1.in | 2 | ||||
| -rw-r--r-- | usr.bin/diff/input2.in | 3 | ||||
| -rw-r--r-- | usr.bin/diff/input_c1.in | 15 | ||||
| -rw-r--r-- | usr.bin/diff/input_c2.in | 16 | ||||
| -rw-r--r-- | usr.bin/diff/simple.out | 5 | ||||
| -rw-r--r-- | usr.bin/diff/simple_b.out | 6 | ||||
| -rw-r--r-- | usr.bin/diff/simple_e.out | 4 | ||||
| -rw-r--r-- | usr.bin/diff/simple_i.out | 6 | ||||
| -rw-r--r-- | usr.bin/diff/simple_n.out | 4 | ||||
| -rw-r--r-- | usr.bin/diff/simple_p.out | 34 | ||||
| -rw-r--r-- | usr.bin/diff/simple_u.out | 7 | ||||
| -rw-r--r-- | usr.bin/diff/simple_w.out | 6 | ||||
| -rw-r--r-- | usr.bin/diff/unified_9999.out | 21 | ||||
| -rw-r--r-- | usr.bin/diff/unified_p.out | 20 |
19 files changed, 226 insertions, 0 deletions
diff --git a/usr.bin/diff/functionname.in b/usr.bin/diff/functionname.in new file mode 100644 index 000000000000..7b4c50c86cd9 --- /dev/null +++ b/usr.bin/diff/functionname.in @@ -0,0 +1,29 @@ +static void +doSomethingThenPrintHello(int test) +{ + test = test << 4; + if (test % 8 == 6) { + return; + } + + print("goodbye\n"); +} + + +- (long) readOffset:(FILE*)file +{ + if( version >= 11){ + long offset; + fread(&offset, sizeof(long), 1, file); + return offset; + } else { + int offset; + fread(&offset, sizeof(int), 1, file); + return offset; + } +} + ++ (BOOL) isEdible:(NSString *)mushroom +{ + return TRUE; +} diff --git a/usr.bin/diff/functionname_c.in b/usr.bin/diff/functionname_c.in new file mode 100644 index 000000000000..84f6846783ca --- /dev/null +++ b/usr.bin/diff/functionname_c.in @@ -0,0 +1,29 @@ +static void +doSomethingThenPrintHello(int test) +{ + test = test << 4; + if (test % 8 == 6) { + return; + } + + print("hello\n"); +} + + +- (long) readOffset:(FILE*)file +{ + if( version >= 11){ + long offset; + fread(&offset, sizeof(long), 1, file); + return offset; + } else { + int offset; + fread(&offset, sizeof(int), 1, file); + return offset; + } +} + ++ (BOOL) isEdible:(NSString *)mushroom +{ + return TRUE; +} diff --git a/usr.bin/diff/functionname_c.out b/usr.bin/diff/functionname_c.out new file mode 100644 index 000000000000..b17ce05d04ca --- /dev/null +++ b/usr.bin/diff/functionname_c.out @@ -0,0 +1,11 @@ +--- functionname.in ++++ functionname_c.in +@@ -6,7 +6,7 @@ doSomethingThenPrintHello(int test) + return; + } + +- print("goodbye\n"); ++ print("hello\n"); + } + + diff --git a/usr.bin/diff/header.out b/usr.bin/diff/header.out new file mode 100644 index 000000000000..2e1665a30e6d --- /dev/null +++ b/usr.bin/diff/header.out @@ -0,0 +1,4 @@ +--- empty 2015-04-03 01:02:03.000000000 +0000 ++++ hello 2016-12-22 11:22:33.000000000 +0000 +@@ -0,0 +1 @@ ++hello diff --git a/usr.bin/diff/header_ns.out b/usr.bin/diff/header_ns.out new file mode 100644 index 000000000000..b1316dfc12b9 --- /dev/null +++ b/usr.bin/diff/header_ns.out @@ -0,0 +1,4 @@ +--- empty 2015-04-03 01:02:03.123456789 +0000 ++++ hello 2016-12-22 11:22:33.987654321 +0000 +@@ -0,0 +1 @@ ++hello diff --git a/usr.bin/diff/input1.in b/usr.bin/diff/input1.in new file mode 100644 index 000000000000..3892e8400f86 --- /dev/null +++ b/usr.bin/diff/input1.in @@ -0,0 +1,2 @@ +Simple input file designed +to be able to test diff diff --git a/usr.bin/diff/input2.in b/usr.bin/diff/input2.in new file mode 100644 index 000000000000..c38b487353a7 --- /dev/null +++ b/usr.bin/diff/input2.in @@ -0,0 +1,3 @@ +Simple input file designed +and written +to be able to test diff utility diff --git a/usr.bin/diff/input_c1.in b/usr.bin/diff/input_c1.in new file mode 100644 index 000000000000..d39dfbdc511b --- /dev/null +++ b/usr.bin/diff/input_c1.in @@ -0,0 +1,15 @@ +/* + * A comment + * + * And another bla + * + * And yet another + */ + +int +main(void) +{ + printf("something"); + + return (0); +} diff --git a/usr.bin/diff/input_c2.in b/usr.bin/diff/input_c2.in new file mode 100644 index 000000000000..933ec67dc175 --- /dev/null +++ b/usr.bin/diff/input_c2.in @@ -0,0 +1,16 @@ +/* + * A comment + * + * And another bla + * + * and yet another + */ + +int +main(void) +{ + + printf("something"); + + return (0); +} diff --git a/usr.bin/diff/simple.out b/usr.bin/diff/simple.out new file mode 100644 index 000000000000..fcbcaa041e8c --- /dev/null +++ b/usr.bin/diff/simple.out @@ -0,0 +1,5 @@ +2c2,3 +< to be able to test diff +--- +> and written +> to be able to test diff utility diff --git a/usr.bin/diff/simple_b.out b/usr.bin/diff/simple_b.out new file mode 100644 index 000000000000..704be9d621a8 --- /dev/null +++ b/usr.bin/diff/simple_b.out @@ -0,0 +1,6 @@ +6c6 +< * And yet another +--- +> * and yet another +11a12 +> diff --git a/usr.bin/diff/simple_e.out b/usr.bin/diff/simple_e.out new file mode 100644 index 000000000000..0c7e2b5c752b --- /dev/null +++ b/usr.bin/diff/simple_e.out @@ -0,0 +1,4 @@ +2c +and written +to be able to test diff utility +. diff --git a/usr.bin/diff/simple_i.out b/usr.bin/diff/simple_i.out new file mode 100644 index 000000000000..9edc1f98d72d --- /dev/null +++ b/usr.bin/diff/simple_i.out @@ -0,0 +1,6 @@ +4c4 +< * And another bla +--- +> * And another bla +11a12 +> diff --git a/usr.bin/diff/simple_n.out b/usr.bin/diff/simple_n.out new file mode 100644 index 000000000000..33ca7090cf97 --- /dev/null +++ b/usr.bin/diff/simple_n.out @@ -0,0 +1,4 @@ +d2 1 +a2 2 +and written +to be able to test diff utility diff --git a/usr.bin/diff/simple_p.out b/usr.bin/diff/simple_p.out new file mode 100644 index 000000000000..f5aebb0d1199 --- /dev/null +++ b/usr.bin/diff/simple_p.out @@ -0,0 +1,34 @@ +*** input_c1.in +--- input_c2.in +*************** +*** 1,14 **** + /* + * A comment + * +! * And another bla + * +! * And yet another + */ + + int + main(void) + { + printf("something"); + + return (0); +--- 1,15 ---- + /* + * A comment + * +! * And another bla + * +! * and yet another + */ + + int + main(void) + { ++ + printf("something"); + + return (0); diff --git a/usr.bin/diff/simple_u.out b/usr.bin/diff/simple_u.out new file mode 100644 index 000000000000..f341987ebec6 --- /dev/null +++ b/usr.bin/diff/simple_u.out @@ -0,0 +1,7 @@ +--- input1 ++++ input2 +@@ -1,2 +1,3 @@ + Simple input file designed +-to be able to test diff ++and written ++to be able to test diff utility diff --git a/usr.bin/diff/simple_w.out b/usr.bin/diff/simple_w.out new file mode 100644 index 000000000000..704be9d621a8 --- /dev/null +++ b/usr.bin/diff/simple_w.out @@ -0,0 +1,6 @@ +6c6 +< * And yet another +--- +> * and yet another +11a12 +> diff --git a/usr.bin/diff/unified_9999.out b/usr.bin/diff/unified_9999.out new file mode 100644 index 000000000000..0f9303fbdc7c --- /dev/null +++ b/usr.bin/diff/unified_9999.out @@ -0,0 +1,21 @@ +--- input_c1.in ++++ input_c2.in +@@ -1,15 +1,16 @@ + /* + * A comment + * +- * And another bla ++ * And another bla + * +- * And yet another ++ * and yet another + */ + + int + main(void) + { ++ + printf("something"); + + return (0); + } diff --git a/usr.bin/diff/unified_p.out b/usr.bin/diff/unified_p.out new file mode 100644 index 000000000000..938b07890fbc --- /dev/null +++ b/usr.bin/diff/unified_p.out @@ -0,0 +1,20 @@ +--- input_c1.in ++++ input_c2.in +@@ -1,14 +1,15 @@ + /* + * A comment + * +- * And another bla ++ * And another bla + * +- * And yet another ++ * and yet another + */ + + int + main(void) + { ++ + printf("something"); + + return (0); |
