╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ doctest.zig ──────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭ find file ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╮ ╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │ │ │http│ ssh │ │ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╯ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
1444 var buffer: Writer.Allocating = .init(test_allocator); 1445 defer buffer.deinit(); 1446 1447 try printShell(&buffer.writer, shell_out, false); 1448 try testing.expectEqualSlices(u8, expected, buffer.written()); 1449 } 1450 { 1451 const shell_out = 1452 \\$ zig build test.zig 1453 \\ 1454 \\$ ./test 1455 \\output 1456 ; 1457 const expected = 1458 \\<figure><figcaption class="shell-cap">Shell</figcaption><pre><samp>$ <kbd>zig build test.zig</kbd> 1459 \\ 1460 \\$ <kbd>./test</kbd> 1461 \\output 1462 \\</samp></pre></figure> 1463 ; 1464 1465 var buffer: Writer.Allocating = .init(test_allocator); 1466 defer buffer.deinit(); 1467 1468 try printShell(&buffer.writer, shell_out, false); 1469 try testing.expectEqualSlices(u8, expected, buffer.written()); 1470 } 1471 { 1472 const shell_out = 1473 \\$ zig build test.zig 1474 \\$ ./test 1475 \\output 1476 ; 1477 const expected = 1478 \\<figure><figcaption class="shell-cap">Shell</figcaption><pre><samp>$ <kbd>zig build test.zig</kbd> 1479 \\$ <kbd>./test</kbd> 1480 \\output 1481 \\</samp></pre></figure> 1482 ; 1483 1484 var buffer: Writer.Allocating = .init(test_allocator); 1485 defer buffer.deinit(); 1486 1487 try printShell(&buffer.writer, shell_out, false); 1488 try testing.expectEqualSlices(u8, expected, buffer.written()); 1489 } 1490 { 1491 const shell_out = 1492 \\$ zig build test.zig \ 1493 \\ --build-option 1494 \\build output 1495 \\$ ./test 1496 \\output 1497 ; 1498 const expected = 1499 \\<figure><figcaption class="shell-cap">Shell</figcaption><pre><samp>$ <kbd>zig build test.zig \ 1500 \\ --build-option</kbd> 1501 \\build output 1502 \\$ <kbd>./test</kbd> 1503 \\output 1504 \\</samp></pre></figure> 1505 ; 1506 1507 var buffer: Writer.Allocating = .init(test_allocator); 1508 defer buffer.deinit(); 1509 1510 try printShell(&buffer.writer, shell_out, false); 1511 try testing.expectEqualSlices(u8, expected, buffer.written()); 1512 } 1513 { 1514 // intentional space after "--build-option1 \" 1515 const shell_out = 1516 \\$ zig build test.zig \ 1517 \\ --build-option1 \ 1518 \\ --build-option2 1519 \\$ ./test 1520 ; 1521 const expected = 1522 \\<figure><figcaption class="shell-cap">Shell</figcaption><pre><samp>$ <kbd>zig build test.zig \ 1523 \\ --build-option1 \ 1524 \\ --build-option2</kbd> 1525 \\$ <kbd>./test</kbd> 1526 \\</samp></pre></figure> 1527 ; 1528 1529 var buffer: Writer.Allocating = .init(test_allocator); 1530 defer buffer.deinit(); 1531 1532 try printShell(&buffer.writer, shell_out, false); 1533 try testing.expectEqualSlices(u8, expected, buffer.written()); 1534 } 1535 { 1536 const shell_out = 1537 \\$ zig build test.zig \ 1538 \\$ ./test 1539 ; 1540 const expected = 1541 \\<figure><figcaption class="shell-cap">Shell</figcaption><pre><samp>$ <kbd>zig build test.zig \ 1542 \\$ ./test</kbd> 1543 \\</samp></pre></figure> 1544 ; 1545 1546 var buffer: Writer.Allocating = .init(test_allocator); 1547 defer buffer.deinit(); 1548 1549 try printShell(&buffer.writer, shell_out, false); 1550 try testing.expectEqualSlices(u8, expected, buffer.written()); 1551 } 1552 { 1553 const shell_out = 1554 \\$ zig build test.zig 1555 \\$ ./test 1556 \\$1 1557 ; 1558 const expected = 1559 \\<figure><figcaption class="shell-cap">Shell</figcaption><pre><samp>$ <kbd>zig build test.zig</kbd> 1560 \\$ <kbd>./test</kbd> 1561 \\$1 1562 \\</samp></pre></figure> 1563 ; 1564 1565 var buffer: Writer.Allocating = .init(test_allocator); 1566 defer buffer.deinit(); 1567 1568 try printShell(&buffer.writer, shell_out, false); 1569 try testing.expectEqualSlices(u8, expected, buffer.written()); 1570 } 1571 { 1572 const shell_out = 1573 \\$zig build test.zig 1574 ; 1575 const expected = 1576 \\<figure><figcaption class="shell-cap">Shell</figcaption><pre><samp>$zig build test.zig 1577 \\</samp></pre></figure> 1578 ; 1579 1580 var buffer: Writer.Allocating = .init(test_allocator); 1581 defer buffer.deinit(); 1582 1583 try printShell(&buffer.writer, shell_out, false); 1584 try testing.expectEqualSlices(u8, expected, buffer.written()); 1585 } 1586 } 1587