Skip to content

Commit

Permalink
Merge branch 'integration_tests'
Browse files Browse the repository at this point in the history
  • Loading branch information
jondot committed Oct 7, 2015
2 parents 7c73f7b + 9ec62ca commit bde4fb9
Show file tree
Hide file tree
Showing 23 changed files with 253 additions and 0 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
language: go
before_install: make setup
script: make test && make && ruby integration.rb
go: 1.4
12 changes: 12 additions & 0 deletions fixtures/full_integration/interpolation/Bladefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
blades:
- source: source.png
mount: after/Assets.xcassets/AppIcon.appiconset
contents: true
- source: source.png
mount: after/Assets.xcassets/Watch.imageset
contents: true
- source: source.png
mount: after/Assets.xcassets/Image.imageset
contents: true


Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"images": [
{
"filename": "source-iphone-29@2x.png",
"idiom": "iphone",
"scale": "2x",
"size": "29x29"
},
{
"filename": "source-iphone-29@3x.png",
"idiom": "iphone",
"scale": "3x",
"size": "29x29"
},
{
"filename": "source-iphone-40@2x.png",
"idiom": "iphone",
"scale": "2x",
"size": "40x40"
},
{
"filename": "source-iphone-40@3x.png",
"idiom": "iphone",
"scale": "3x",
"size": "40x40"
},
{
"filename": "source-iphone-60@2x.png",
"idiom": "iphone",
"scale": "2x",
"size": "60x60"
},
{
"filename": "source-iphone-60@3x.png",
"idiom": "iphone",
"scale": "3x",
"size": "60x60"
}
],
"info": {
"author": "xcode",
"version": 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"images": [
{
"filename": "source-universal-333@1x.png",
"idiom": "universal",
"scale": "1x",
"size": "333x333"
},
{
"filename": "source-universal-333@2x.png",
"idiom": "universal",
"scale": "2x",
"size": "666x666"
},
{
"filename": "source-universal-333@3x.png",
"idiom": "universal",
"scale": "3x",
"size": "1000x1000"
}
],
"info": {
"author": "xcode",
"version": 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"images": [
{
"filename": "source-universal-333@1x.png",
"idiom": "universal",
"scale": "1x",
"size": "333x333"
},
{
"filename": "source-universal-333@2x.png",
"idiom": "universal",
"scale": "2x",
"size": "666x666"
},
{
"filename": "source-universal-333@3x.png",
"idiom": "universal",
"scale": "3x",
"size": "1000x1000"
},
{
"filename": "source-watch-500@2x.png",
"idiom": "watch",
"scale": "2x",
"size": "1000x1000"
},
{
"filename": "source-watch-500@2x.png",
"idiom": "watch",
"scale": "2x",
"size": "1000x1000"
},
{
"filename": "source-watch-500@2x.png",
"idiom": "watch",
"scale": "2x",
"size": "1000x1000"
}
],
"info": {
"author": "xcode",
"version": 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
},
{
"idiom" : "watch",
"scale" : "2x"
},
{
"idiom" : "watch",
"scale" : "2x",
"screen-width" : "<=145"
},
{
"idiom" : "watch",
"scale" : "2x",
"screen-width" : ">145"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions integration.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
require 'fileutils'
include FileUtils

def error_if(condition, msg)
return unless condition
puts msg
exit(1)
end

puts "Running integration tests..."

blade = File.join(File.expand_path(File.dirname(__FILE__)), 'blade')
tests = %w{ interpolation }

tests.each do |test|
test_dir = File.expand_path("fixtures/full_integration/#{test}", File.dirname(__FILE__))
cd test_dir
rm_rf "after"
cp_r "before", "after"
blade_out = `#{blade}`
error_if(!blade_out.empty?, blade_out)
exit(1) unless blade_out.empty?
diff_out = `git diff #{test_dir}`
error_if(!diff_out.empty?, diff_out)
putc "."
end

puts "\nOK"





0 comments on commit bde4fb9

Please sign in to comment.