Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

multi_line.js 992B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. var test = require('tape');
  2. var archy = require('../');
  3. test('multi-line', function (t) {
  4. var s = archy({
  5. label : 'beep\none\ntwo',
  6. nodes : [
  7. 'ity',
  8. {
  9. label : 'boop',
  10. nodes : [
  11. {
  12. label : 'o_O\nwheee',
  13. nodes : [
  14. {
  15. label : 'oh',
  16. nodes : [ 'hello', 'puny\nmeat' ]
  17. },
  18. 'creature'
  19. ]
  20. },
  21. 'party\ntime!'
  22. ]
  23. }
  24. ]
  25. });
  26. t.equal(s, [
  27. 'beep',
  28. '│ one',
  29. '│ two',
  30. '├── ity',
  31. '└─┬ boop',
  32. ' ├─┬ o_O',
  33. ' │ │ wheee',
  34. ' │ ├─┬ oh',
  35. ' │ │ ├── hello',
  36. ' │ │ └── puny',
  37. ' │ │ meat',
  38. ' │ └── creature',
  39. ' └── party',
  40. ' time!',
  41. ''
  42. ].join('\n'));
  43. t.end();
  44. });