@@ -53,11 +53,6 @@ describe("install and uninstall", () => {
5353 expect ( stderr ) . not . toMatch ( packageName ) ;
5454 } ) ;
5555
56- it ( "installs file directly" , async ( ) => {
57- const { stderr } = await ctx . runEask ( "install-file ./mini.pkg.2" ) ;
58- expect ( stderr ) . toMatch ( "mini.pkg.2" ) ;
59- } ) ;
60-
6156 test . skip ( "installs vc directly" , async ( ) => {
6257 if ( ( await emacsVersion ( ) ) >= "29.1" ) {
6358 const { stderr } = await ctx . runEask (
@@ -66,6 +61,52 @@ describe("install and uninstall", () => {
6661 expect ( stderr ) . toMatch ( "msgu" ) ;
6762 }
6863 } ) ;
64+
65+ describe ( "eask install-file" , ( ) => {
66+ beforeAll ( async ( ) => {
67+ await ctx . runEask ( "clean workspace" ) ;
68+ } ) ;
69+
70+ it ( "installs file directly" , async ( ) => {
71+ const { stderr } = await ctx . runEask ( "install-file ./mini.pkg.2" ) ;
72+ expect ( stderr ) . toMatch ( "mini.pkg.2" ) ;
73+ } ) ;
74+
75+ it ( "uses the correct package name" , async ( ) => {
76+ const { stderr } = await ctx . runEask ( "install-file ./foo-mode" ) ;
77+ expect ( stderr ) . toMatch ( "foo" ) ;
78+ } ) ;
79+
80+ it ( "can repeat installs" , async ( ) => {
81+ await ctx . runEask ( "install-file ./foo-mode" ) ;
82+ } ) ;
83+
84+ it ( "reinstalls a package using --force" , async ( ) => {
85+ const { stderr } = await ctx . runEask ( "install-file --force ./foo-mode" ) ;
86+ expect ( stderr ) . toMatch ( "foo" ) ;
87+ } ) ;
88+
89+ it ( "installs a package with only an Eask file" , async ( ) => {
90+ await ctx . runEask ( "install-file ./foo-no-pkg" ) ;
91+ } ) ;
92+
93+ it ( "errors when path is non-existing" , async ( ) => {
94+ await expect ( ctx . runEask ( "install-file ./foo" ) ) . rejects . toThrow ( ) ;
95+ } ) ;
96+
97+ it ( "errors when path is an empty directory" , async ( ) => {
98+ await expect ( ctx . runEask ( "install-file ../empty" ) ) . rejects . toThrow ( ) ;
99+ } ) ;
100+
101+ it ( "gets the package name from a tar file" , async ( ) => {
102+ await ctx . runEask ( "install-file ./foo.tar.gz" ) ;
103+ } ) ;
104+
105+ it ( "can install tar files created with eask package" , async ( ) => {
106+ // foo-0.0.1.tar is created by running eask package in ./foo-no-pkg
107+ await ctx . runEask ( "install-file ./foo-0.0.1.tar" ) ;
108+ } ) ;
109+ } ) ;
69110 } ) ;
70111
71112 describe ( "in an empty project" , ( ) => {
0 commit comments