livetext 0.9.21 → 0.9.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/imports/bookish.rb +8 -10
  3. data/imports/pyggish.rb +2 -34
  4. data/imports/tutorial.rb +2 -2
  5. data/lib/cmdargs.rb +2 -3
  6. data/lib/formatline.rb +101 -73
  7. data/lib/functions.rb +16 -1
  8. data/lib/handler/{icanhaz.rb → import.rb} +1 -1
  9. data/lib/handler.rb +1 -1
  10. data/lib/helpers.rb +10 -10
  11. data/lib/livetext.rb +12 -5
  12. data/lib/parser/set.rb +1 -3
  13. data/lib/parser/string.rb +2 -2
  14. data/lib/processor.rb +6 -2
  15. data/lib/standard.rb +15 -15
  16. data/lib/userapi.rb +4 -2
  17. data/plugin/bookish.rb +4 -5
  18. data/plugin/pyggish.rb +45 -77
  19. data/plugin/tutorial.rb +0 -1
  20. data/test/snapshots/error_inc_line_num/actual-error.txt +14 -0
  21. data/test/snapshots/error_inc_line_num/actual-output.txt +7 -0
  22. data/test/snapshots/error_inc_line_num/out-sdiff.txt +14 -0
  23. data/test/snapshots/error_invalid_name/actual-error.txt +10 -0
  24. data/test/snapshots/{icanhaz2/expected-error.txt → error_invalid_name/actual-output.txt} +0 -0
  25. data/test/snapshots/error_invalid_name/out-sdiff.txt +6 -0
  26. data/test/snapshots/error_missing_end/actual-error.txt +10 -0
  27. data/test/snapshots/error_missing_end/actual-output.txt +0 -0
  28. data/test/snapshots/error_missing_end/out-sdiff.txt +6 -0
  29. data/test/snapshots/error_no_such_copy/actual-error.txt +10 -0
  30. data/test/snapshots/error_no_such_copy/actual-output.txt +0 -0
  31. data/test/snapshots/error_no_such_inc/actual-error.txt +10 -0
  32. data/test/snapshots/error_no_such_inc/actual-output.txt +0 -0
  33. data/test/snapshots/error_no_such_mixin/actual-error.txt +13 -0
  34. data/test/snapshots/error_no_such_mixin/actual-output.txt +0 -0
  35. data/test/snapshots/error_no_such_mixin/out-sdiff.txt +6 -0
  36. data/test/snapshots/import/actual-error.txt +13 -0
  37. data/test/snapshots/import/actual-output.txt +0 -0
  38. data/test/snapshots/{icanhaz → import}/expected-output.txt +0 -0
  39. data/test/snapshots/{icanhaz → import}/match-error.txt +0 -0
  40. data/test/snapshots/import/out-sdiff.txt +6 -0
  41. data/test/snapshots/{icanhaz → import}/simple_import.rb +0 -0
  42. data/test/snapshots/{icanhaz → import}/source.lt3 +2 -2
  43. data/test/snapshots/import2/expected-error.txt +0 -0
  44. data/test/snapshots/{icanhaz2 → import2}/expected-output.txt +3 -1
  45. data/test/snapshots/{icanhaz2/simple_canhaz.rb → import2/simple_import.rb} +0 -0
  46. data/test/snapshots/import2/source.lt3 +8 -0
  47. data/test/snapshots/more_functions/expected-error.txt +0 -0
  48. data/test/snapshots/more_functions/expected-output.txt +37 -0
  49. data/test/snapshots/more_functions/source.lt3 +40 -0
  50. data/test/snapshots/simple_import/expected-output.txt +2 -0
  51. data/test/snapshots/simple_import/source.lt3 +3 -1
  52. data/test/snapshots/subset.txt +11 -12
  53. data/test/snapshots/wtf_bookish/expected-error.txt +0 -0
  54. data/test/snapshots/wtf_bookish/expected-output.txt +10 -0
  55. data/test/snapshots/wtf_bookish/source.lt3 +7 -0
  56. data/test/snapshots/wtf_bookish/toc.tmp +0 -0
  57. data/test/snapshots.rb +6 -7
  58. data/test/unit/formatline.rb +252 -135
  59. data/test/unit/parser/set.rb +6 -10
  60. data/test/unit/parser/string.rb +5 -5
  61. data/test/unit/standard.rb +0 -1
  62. metadata +37 -13
  63. data/lib/livetext/importable.rb +0 -2
  64. data/lib/parser/import.rb +0 -15
  65. data/test/snapshots/icanhaz2/source.lt3 +0 -6
@@ -0,0 +1,10 @@
1
+ <table cellpadding=2>
2
+ <tr>
3
+ <td width=[0, 0]% valign=top>this</td>
4
+ <td width=[0, 0]% valign=top>that</td>
5
+ </tr>
6
+ <tr>
7
+ <td width=[0, 0]% valign=top>foo</td>
8
+ <td width=[0, 0]% valign=top>bar</td>
9
+ </tr>
10
+ </table>
@@ -0,0 +1,7 @@
1
+ .import bookish
2
+
3
+ .simple_table
4
+ this :: that
5
+ foo :: bar
6
+ .end
7
+
File without changes
data/test/snapshots.rb CHANGED
@@ -1,4 +1,3 @@
1
- require 'minitest/autorun'
2
1
 
3
2
  require_relative '../lib/livetext'
4
3
 
@@ -45,8 +44,8 @@ class TestingLivetext < MiniTest::Test
45
44
 
46
45
  TTY = File.open("/dev/tty","w")
47
46
 
48
- def self.get_dir # FIXME - uh what?
49
- cmdline = ARGV.first == "cmdline" # FIXME remove??
47
+ def self.get_dir # FIXME - uh what? remove this??
48
+ cmdline = ARGV.first == "cmdline"
50
49
  if cmdline
51
50
  dir = "../"
52
51
  Dir.chdir `livetext --path`.chomp.chomp
@@ -56,15 +55,11 @@ class TestingLivetext < MiniTest::Test
56
55
  end
57
56
 
58
57
  args = ARGV - ["cmdline"]
59
-
60
58
  dir = self.get_dir
61
-
62
59
  Data = "#{dir}test/snapshots"
63
60
  Dir.chdir(Data)
64
-
65
61
  TestDirs = Dir.entries(".").reject {|fname| ! File.directory?(fname) } - %w[. ..]
66
62
 
67
-
68
63
  def self.filter
69
64
  all = Dir.entries(".").reject {|fname| ! File.directory?(fname) } - %w[. ..]
70
65
  @included, @excluded = all, []
@@ -113,6 +108,10 @@ class TestingLivetext < MiniTest::Test
113
108
  @included - @excluded
114
109
  end
115
110
 
111
+ def after_suites
112
+ puts "Woohoo!"
113
+ end
114
+
116
115
  def initialize(base, assertion = nil)
117
116
  @assertion = assertion
118
117
  @base = base