Permalink
Browse files

update expected hashes/filenames in tests since there appear to be ne…

…wlines in minified files now, which changes the md5 hash
  • Loading branch information...
1 parent 7fc5323 commit d68d3b186f99aa6325154a3f84de1c95ff02bed8 @zytzagoo committed Apr 25, 2017
Showing with 4 additions and 4 deletions.
  1. +4 −4 tests/test-ao.php
View
@@ -133,7 +133,7 @@ private function normalize_newlines($str)
<!--[if gt IE 8]><!--> <html class="no-svg no-js" xmlns:fb="https://www.facebook.com/2008/fbml" xmlns:og="http://ogp.me/ns#" lang="hr"> <!--<![endif]-->
<head>
<meta charset="utf-8">
-<link type="text/css" media="all" href="http://cdn.example.org/wp-content/cache/autoptimize/css/autoptimize_d667caf7140c2935d18eb478db07525f.css" rel="stylesheet" /><title>Mliječna juha od brokule &#9832; Kuhaj.hr</title>
+<link type="text/css" media="all" href="http://cdn.example.org/wp-content/cache/autoptimize/css/autoptimize_b14b273dfffdb2d292672833da60d3cb.css" rel="stylesheet" /><title>Mliječna juha od brokule &#9832; Kuhaj.hr</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<!--[if lt IE 9]>
@@ -165,7 +165,7 @@ private function normalize_newlines($str)
<script type='text/javascript' src='http://example.org/wp-content/themes/my-theme/js/m-mobilemenu.js'></script>
<script type='text/javascript' src='http://example.org/wp-content/themes/my-theme/js/main.js'></script>
-<script type="text/javascript" defer src="http://cdn.example.org/wp-content/cache/autoptimize/js/autoptimize_7495b56803cd08e61702598244e0fb09.js"></script></body>
+<script type="text/javascript" defer src="http://cdn.example.org/wp-content/cache/autoptimize/js/autoptimize_730dfe55780a3a6fc98224e18fa27340.js"></script></body>
</html>
MARKUP;
@@ -178,7 +178,7 @@ private function normalize_newlines($str)
<!--[if gt IE 8]><!--> <html class="no-svg no-js" xmlns:fb="https://www.facebook.com/2008/fbml" xmlns:og="http://ogp.me/ns#" lang="hr"> <!--<![endif]-->
<head>
<meta charset="utf-8">
-<link type="text/css" media="all" href="http://cdn.example.org/wp-content/cache/autoptimize/1/css/autoptimize_d667caf7140c2935d18eb478db07525f.css" rel="stylesheet" /><title>Mliječna juha od brokule &#9832; Kuhaj.hr</title>
+<link type="text/css" media="all" href="http://cdn.example.org/wp-content/cache/autoptimize/1/css/autoptimize_b14b273dfffdb2d292672833da60d3cb.css" rel="stylesheet" /><title>Mliječna juha od brokule &#9832; Kuhaj.hr</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<!--[if lt IE 9]>
@@ -210,7 +210,7 @@ private function normalize_newlines($str)
<script type='text/javascript' src='http://example.org/wp-content/themes/my-theme/js/m-mobilemenu.js'></script>
<script type='text/javascript' src='http://example.org/wp-content/themes/my-theme/js/main.js'></script>
-<script type="text/javascript" defer src="http://cdn.example.org/wp-content/cache/autoptimize/1/js/autoptimize_7495b56803cd08e61702598244e0fb09.js"></script></body>
+<script type="text/javascript" defer src="http://cdn.example.org/wp-content/cache/autoptimize/1/js/autoptimize_730dfe55780a3a6fc98224e18fa27340.js"></script></body>
</html>
MARKUP;

6 comments on commit d68d3b1

the md5-hash changes because we're minifying first and then aggregating minified code, vs before aggregating unminified code first and minifying second.

Owner

zytzagoo replied Apr 25, 2017

there's maybe potential for improvement in there somewhere probably - because the only difference in actually generated files for some of the (rather simple/limited) tests i've done locally appear to be that minify-first files have some extra new lines in there (and no other differences) - so maybe a few more bytes can be shaved off...

i'll try looking into it some more if/when time permits...

first attempt; futtta/autoptimize@d6880f8 (you'll also need the previous commit for the JS cleanup).

Owner

zytzagoo replied Apr 26, 2017

Hashes haven't changed after bringing in those code changes... so... what gives?
https://travis-ci.org/zytzagoo/autoptimize/builds/225911775

Please sign in to comment.