File tree Expand file tree Collapse file tree 3 files changed +66
-3
lines changed
Expand file tree Collapse file tree 3 files changed +66
-3
lines changed Original file line number Diff line number Diff line change @@ -98,3 +98,41 @@ filegroup(
9898 ":dist_zip" ,
9999 ],
100100)
101+
102+ filegroup (
103+ name = "javascript" ,
104+ srcs = [
105+ "asserts.js" ,
106+ "binary/any_field_type.js" ,
107+ "binary/arith.js" ,
108+ "binary/binary_constants.js" ,
109+ "binary/bytesource.js" ,
110+ "binary/bytesource_alias.js" ,
111+ "binary/decoder.js" ,
112+ "binary/decoder_alias.js" ,
113+ "binary/encoder.js" ,
114+ "binary/encoder_alias.js" ,
115+ "binary/errors.js" ,
116+ "binary/internal_buffer.js" ,
117+ "binary/reader.js" ,
118+ "binary/reader_alias.js" ,
119+ "binary/repeated_field_type.js" ,
120+ "binary/scalar_field_type.js" ,
121+ "binary/test_utils.js" ,
122+ "binary/utf8.js" ,
123+ "binary/utils.js" ,
124+ "binary/writer.js" ,
125+ "binary/writer_alias.js" ,
126+ "bytestring.js" ,
127+ "debug.js" ,
128+ "extension_field_binary_info.js" ,
129+ "extension_field_info.js" ,
130+ "internal_bytes.js" ,
131+ "internal_options.js" ,
132+ "internal_public.js" ,
133+ "map.js" ,
134+ "message.js" ,
135+ "unsafe_bytestring.js" ,
136+ ],
137+ visibility = ["//visibility:public" ],
138+ )
Original file line number Diff line number Diff line change @@ -26,5 +26,12 @@ $(location @protobuf//:protoc) \
2626sh_test (
2727 name = "simple_js_test" ,
2828 srcs = ["simple_js_test.sh" ],
29- data = [":simple.js" ],
29+ args = [
30+ "$(location :simple.js)" ,
31+ "$(locations @protobuf_javascript//:javascript)" ,
32+ ],
33+ data = [
34+ ":simple.js" ,
35+ "@protobuf_javascript//:javascript" ,
36+ ],
3037)
Original file line number Diff line number Diff line change 11#! /bin/bash
22set -euo pipefail
33
4- file ./simple.js
5- echo " PASS"
4+ # Check that we received arguments
5+ if [ $# -eq 0 ]; then
6+ echo " FAIL: No arguments provided"
7+ exit 1
8+ fi
9+
10+ # Verify each arg is a readable file
11+ for arg in " $@ " ; do
12+ if [ ! -f " $arg " ]; then
13+ echo " FAIL: $arg is not a file"
14+ exit 1
15+ fi
16+
17+ if [ ! -s " $arg " ]; then
18+ echo " FAIL: $arg is empty"
19+ exit 1
20+ fi
21+ done
22+
23+ echo " PASS: Verified $# file(s)"
You can’t perform that action at this time.
0 commit comments